[Zope] Strange Error with mxDateTime/Zope 1.11pr1 win32 / als o ODBC Problems

Miller, John M. jmiller1@uop.com
Wed, 9 Jun 1999 07:49:45 -0500


Phil,

Unfortunately I can't help you with the first one (sorry!), but I believe I
can be of more use with your second problem.  If this is the same problem I
saw when first using Zope to connect to an Access DB, then you need to go
into DateTime.py and edit the timezone information to represent the setup on
your computer.  For example, take my lovely machine- located in the bleak
Central timezone.  I went to the Windows Date/Time properties window,
checked the timezone
tab and saw something along the following:

	(GMT -06:00) Central Time (US&Canada)

Taking this info I went to DateTime.py, found the declaration for the _zmap
variable and added the following:

	'Central Time':'US/Central'

'Central Time' because that's what Windows is using, 'US/Central' because it
was listed in _zlst and made sense (hopefully it makes sense to you too).

All seemed hunky-dorey after that.  Hope this helps.

I can't help but seem to detect the distinct, flowery aroma of FAQ with this
question.  Does anybody else seem to notice it too?  I'd be happy to write
this up in a more suitable format and submit it if this were the case...

John

> -----Original Message-----
> From:	Phil Harris [SMTP:phil@philh.org]
> Sent:	Wednesday, June 09, 1999 2:39 AM
> To:	zope@zope.org
> Subject:	[Zope] Strange Error with mxDateTime/Zope 1.11pr1 win32 /
> also ODBC Problems
> 
> Hi all,
> 
> I hope someone can help me here, I have installed and am happily using the
> mxDatetime package.
> 
> Now the problem, I'm getting a strange error message that I hope someone
> can
> help with:
> 
> Traceback says
> 
> Traceback (innermost last):
>   File D:\zope\lib\python\ZPublisher\Publish.py, line 255, in
> publish_module
>   File D:\zope\lib\python\ZPublisher\Publish.py, line 157, in publish
>   File D:\zope\lib\python\ZPublisher\mapply.py, line 154, in mapply
>     (Object: index_html)
>   File D:\zope\lib\python\ZPublisher\Publish.py, line 98, in call_object
>     (Object: index_html)
>   File D:\zope\lib\python\OFS\DTMLDocument.py, line 181, in __call__
>     (Object: index_html)
>   File D:\zope\lib\python\OFS\DTMLDocument.py, line 177, in __call__
>     (Object: index_html)
>   File D:\zope\lib\python\DocumentTemplate\DT_String.py, line 514, in
> __call__
>     (Object: index_html)
>   File D:\zope\lib\python\DocumentTemplate\DT_Util.py, line 315, in eval
>     (Object: drawcal(year=1999,month=3))
>   File <string>, line 0, in ?
>   File D:\zope\lib\python\Products\ExternalMethod\ExternalMethod.py, line
> 231, in __call__
>     (Object: drawcal)
>   File D:\zope\lib\python\Products\ExternalMethod\ExternalMethod.py, line
> 193, in getFunction
>     (Object: drawcal)
>   File D:\zope\lib\python\App\Extensions.py, line 195, in getObject
>     (Info: ('d:/Zope\\Extensions\\drawcal.py', 'drawcal'))
>   File d:/Zope\Extensions\drawcal.py, line 71, in ?
>   File d:/Zope\Extensions\drawcal.py, line 9, in drawcal
>   File D:\zope\lib\python\DateTime\DateTime.py, line 582, in __init__
> TypeError: (see above)
> 
> and the actual error message is:-
> 
> Zope Error
> Zope has encountered an error while publishing this resource.
> 
> Error Type: TypeError
> Error Value: not all arguments converted
>              ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> Versions of software used are Zope 1.11pr1 with the binary python that
> comes
> with this, using zserver as the server.
> 
> Now problem number two, and I'm not alone here, at least one other user
> I'm
> in contact with also suffers with this.
> 
> When using ODBC with MS Access and/or MySQL opn Win32 I get strange errors
> whenever a date field is read from the database, namely:-
> 
> Traceback (innermost last):
>   File D:\zope\lib\python\ZPublisher\Publish.py, line 255, in
> publish_module
>   File D:\zope\lib\python\ZPublisher\Publish.py, line 157, in publish
>   File D:\zope\lib\python\ZPublisher\mapply.py, line 154, in mapply
>     (Object: manage_test)
>   File D:\zope\lib\python\ZPublisher\Publish.py, line 98, in call_object
>     (Object: manage_test)
>   File D:\zope\lib\python\Shared\DC\ZRDB\DA.py, line 300, in manage_test
>     (Object: test)
>   File D:\zope\lib\python\DocumentTemplate\DT_String.py, line 514, in
> __call__
>     (Object: <string>)
>   File D:\zope\lib\python\DocumentTemplate\DT_In.py, line 580, in renderwb
>     (Object: test)
>   File D:\zope\lib\python\Shared\DC\ZRDB\RDB.py, line 272, in __getitem__
> ValueError: Invalid value, 1999-04-23 00:00:00, for DATE in record 1316
> 
> Well that's enough problems for now, thanks in advance for any
> suggestions.
> 
> See ya
> 
> Phil
> phil@philh.org
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )