Bugs item #3438213, was opened at 2011-11-15 02:12
Message generated for change (Comment added) made by hovea
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3438213&group_id=78018
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: win32timezone
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Anthony (hovea)
Assigned to: Nobody/Anonymous (nobody)
Summary: astimezone could not process time on Pythonwin for 3.2
Initial Comment:
Runing the testPersist.py
Timezone processing failed on python32
returning Stat 1
pythoncom error: Unexpected exception in gateway method '<unknown>'
ValueError: astimezone() cannot be applied to a naive datetime
pythoncom error: Unexpected gateway error
ValueError: astimezone() cannot be applied to a naive datetime
Set Size0
Traceback (most recent call last):
File "C:\Python32\Lib\site-packages\win32com\test\testPersist.py", line 204, in <module>
test()
File "C:\Python32\Lib\site-packages\win32com\test\testPersist.py", line 134, in test
stcom = pythoncom.StgCreateDocfileOnILockBytes(lbcom, storagecon.STGM_DIRECT| storagecon.STGM_CREATE | storagecon.STGM_READWRITE | storagecon.STGM_SHARE_EXCLUSIVE, 0)
pywintypes.com_error: (-2147467259, 'Unspecified error', None, None)
----------------------------------------------------------------------
>Comment By: Anthony (hovea)
Date: 2011-11-19 06:02
Message:
This issues is cause in PyObject *PyIPropertyStorage::SetTimes(PyObject
*self, PyObject *args).
File PyIpropertyStorage.cpp line 622, which is called by Com Storage
creation.
PyWinObject_AsFILETIME not set the timezone information will cause failed
of SetTimes.
----------------------------------------------------------------------
Comment By: Anthony (hovea)
Date: 2011-11-16 01:02
Message:
The Error is generated by pythoncom.StgCreateDocfileOnILockBytes call from
testPersist.py" . Which is located in PyTime.cpp. line 806.
I am building pywin by using VisualStudio 2008sp1. Simply Run setup.py
build in the source code directory.
When I am tracking down, it seems that from python3, astimezone should
function should have timezone information to convert the correct time.
I did not yet indentify where PyWinObject_AsSYSTEMTIME is called.
----------------------------------------------------------------------
Comment By: Jason R. Coombs (jaraco)
Date: 2011-11-15 06:30
Message:
I'm not familiar with building pywin32 from scratch. Are there instructions
somewhere on how to build pywin32 on Python 3? I don't have VS2008 handy,
so I tried using VS2010 and patched msvc9compilermodule with
jaraco.develop.msvc
(https://bitbucket.org/jaraco/jaraco.develop/src/5d0574e79d6f/jaraco/develop/msvc.py),
but I'm still unable to build.
Furthermore, I don't think this is an issue with win32timezone.
"astimezone()" is a method on a datetime.datetime object (part of the
stdlib). I don't think win32timezone comes into play.
Furthermore, the text 'timezone' doesn't appear in testPersist.py. I don't
understand what testPersist.py is trying to do. I think the errors about
naive datetimes are coming from some other code which is opaque to
testPersist.
I don't feel qualified to address this issue, so I'm going to re-assign
this to no one.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3438213&group_id=78018
|