pywin32-bugs Mailing List for Python for Windows Extensions (Page 6)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(24) |
May
(19) |
Jun
(15) |
Jul
(43) |
Aug
(39) |
Sep
(25) |
Oct
(43) |
Nov
(19) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(21) |
Feb
(18) |
Mar
(14) |
Apr
(80) |
May
(56) |
Jun
(24) |
Jul
(30) |
Aug
(17) |
Sep
(36) |
Oct
(106) |
Nov
(38) |
Dec
(30) |
2005 |
Jan
(14) |
Feb
(14) |
Mar
(48) |
Apr
(28) |
May
(49) |
Jun
(23) |
Jul
(9) |
Aug
(13) |
Sep
(28) |
Oct
(21) |
Nov
(8) |
Dec
(26) |
2006 |
Jan
(56) |
Feb
(33) |
Mar
(33) |
Apr
(18) |
May
(16) |
Jun
(9) |
Jul
(24) |
Aug
(16) |
Sep
(14) |
Oct
(37) |
Nov
(38) |
Dec
(22) |
2007 |
Jan
(7) |
Feb
(16) |
Mar
(11) |
Apr
(15) |
May
(15) |
Jun
(8) |
Jul
(24) |
Aug
(26) |
Sep
(18) |
Oct
(11) |
Nov
(20) |
Dec
(1) |
2008 |
Jan
(19) |
Feb
(55) |
Mar
(7) |
Apr
(35) |
May
(66) |
Jun
(38) |
Jul
(26) |
Aug
(5) |
Sep
(25) |
Oct
(25) |
Nov
(18) |
Dec
(18) |
2009 |
Jan
(25) |
Feb
(38) |
Mar
(29) |
Apr
(25) |
May
(5) |
Jun
(11) |
Jul
(16) |
Aug
(16) |
Sep
(16) |
Oct
(1) |
Nov
(15) |
Dec
(33) |
2010 |
Jan
(13) |
Feb
(11) |
Mar
(1) |
Apr
(24) |
May
(26) |
Jun
(19) |
Jul
(22) |
Aug
(51) |
Sep
(38) |
Oct
(39) |
Nov
(25) |
Dec
(27) |
2011 |
Jan
(40) |
Feb
(31) |
Mar
(21) |
Apr
(42) |
May
(11) |
Jun
(16) |
Jul
(20) |
Aug
(14) |
Sep
(6) |
Oct
(8) |
Nov
(34) |
Dec
(7) |
2012 |
Jan
(60) |
Feb
(24) |
Mar
(6) |
Apr
(28) |
May
(41) |
Jun
(15) |
Jul
(14) |
Aug
(25) |
Sep
(30) |
Oct
(18) |
Nov
(30) |
Dec
(9) |
2013 |
Jan
(3) |
Feb
(8) |
Mar
(17) |
Apr
(23) |
May
(34) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2012-11-04 23:12:15
|
Feature Requests item #3583043, was opened at 2012-11-03 22:18 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3583043&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jarod (jarod38) Assigned to: Nobody/Anonymous (nobody) Summary: Provide msi as-is for downloading Initial Comment: By reading the tracker I learned that the msi created with bdist_msi doesn't work, and that easy_install doesn't work either. For both, it is because they are unable to run the post-install script. As far as I know, there is no way to silently install this module (I need that in order to install it on thousands of computers...) I know I could setup the sdk and try to create an installer with inno setup or something like that, but I don't want to reinvent the wheel and I would much prefer that a solution could be found for everyone, not just me. Would it be possible for you to publish the not-fully-working msis, together with the post-install script ? If I understand correctly, it should work to install the msi then run the post-install script separately ? ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-11-04 15:12 Message: I'm a little reluctant to do that as people will not read the release notes and will assume it "just works". However, do note that you could just: a) install into a "test" box. b) copy the top-level pywin32 directories - eg, into a .zip file. c) unpack those files onto the target d) run the post-install script. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3583043&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-11-04 05:18:08
|
Feature Requests item #3583043, was opened at 2012-11-03 22:18 Message generated for change (Tracker Item Submitted) made by jarod38 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3583043&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jarod (jarod38) Assigned to: Nobody/Anonymous (nobody) Summary: Provide msi as-is for downloading Initial Comment: By reading the tracker I learned that the msi created with bdist_msi doesn't work, and that easy_install doesn't work either. For both, it is because they are unable to run the post-install script. As far as I know, there is no way to silently install this module (I need that in order to install it on thousands of computers...) I know I could setup the sdk and try to create an installer with inno setup or something like that, but I don't want to reinvent the wheel and I would much prefer that a solution could be found for everyone, not just me. Would it be possible for you to publish the not-fully-working msis, together with the post-install script ? If I understand correctly, it should work to install the msi then run the post-install script separately ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551957&aid=3583043&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-29 22:01:37
|
Bugs item #3581717, was opened at 2012-10-29 15:01 Message generated for change (Tracker Item Submitted) made by cjgohlke You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3581717&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Christoph Gohlke (cjgohlke) Assigned to: Nobody/Anonymous (nobody) Summary: Header files missing in pywin32-218.zip Initial Comment: Building pywin32-218 from the source distribution, pywin32-218.zip, fails because several header files are missing from win32\src\PerfMon and other source directories. Building from Mercurial repository works. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3581717&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-28 20:38:57
|
Bugs item #3530195, was opened at 2012-05-28 01:37 Message generated for change (Comment added) made by dcmacleo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3530195&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: installation Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: 3860654 () Assigned to: Nobody/Anonymous (nobody) Summary: errors towards the end of installation. Initial Comment: While trying to install pywin32-217.win-amd64-py2.6.exe, I get following errors towards the end of installation. Traceback (most recent call last): File "<string>", line 612, in <module> File "<string>", line 322, in install File "<string>", line 160, in LoadSystemModule ImportError: DLL load failed: The specified module could not be found. ---------------------------------------------------------------------- Comment By: D-Mac (dcmacleo) Date: 2012-10-28 13:38 Message: OK, got ambitious and looked it up myself! ;) Here's what worked for me for others: http://forums.arcgis.com/threads/33808-PyWin32-212.win32-py2.6-silent-install ---------------------------------------------------------------------- Comment By: D-Mac (dcmacleo) Date: 2012-10-28 13:18 Message: I get this install error with 217 on both Vista 32 and 64, w/ 32bit Python 2.6 on both. Is there a manual install method? I'd like to use the library very much. Thanks. ---------------------------------------------------------------------- Comment By: Glenn Linderman (guruglenn) Date: 2012-07-06 02:05 Message: Build 217.1 works for me. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2012-07-06 00:14 Message: I put a build up at http://starship.python.net/~skippy/downloads/pywin32-217.1.win-amd64-py3.3.exe - it works for me here, but it would be great if anyone experiencing this problem could test it out. It is being slow to upload, so give it 30 mins after this message was posted - the filesize is 8,441,923. I'll make a real release soon... ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2012-07-05 00:36 Message: These problems all appear to be specific to 3.3. Sadly pywin32-217 was built with vc2008 where 3.3 recently moved to vs2010. I'm looking into it... ---------------------------------------------------------------------- Comment By: Glenn Linderman (guruglenn) Date: 2012-07-04 23:28 Message: Just for kicks, I added a print statement in LoadSystemModule in pywin32_postinstall.py, and the module it cannot load, on my system, is c:\python33\Lib\site-packages\pywin32_system32\pywintypes33.dll This probably doesn't surprise you since that is what the comments imply... The file exists in that location. Is there something else I can do to help debug this problem? ---------------------------------------------------------------------- Comment By: Glenn Linderman (guruglenn) Date: 2012-07-04 18:13 Message: I get the same error trying to install pywin32-217.win-amd64-py3.3.exe ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3530195&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-28 20:18:44
|
Bugs item #3530195, was opened at 2012-05-28 01:37 Message generated for change (Comment added) made by dcmacleo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3530195&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: installation Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: 3860654 () Assigned to: Nobody/Anonymous (nobody) Summary: errors towards the end of installation. Initial Comment: While trying to install pywin32-217.win-amd64-py2.6.exe, I get following errors towards the end of installation. Traceback (most recent call last): File "<string>", line 612, in <module> File "<string>", line 322, in install File "<string>", line 160, in LoadSystemModule ImportError: DLL load failed: The specified module could not be found. ---------------------------------------------------------------------- Comment By: D-Mac (dcmacleo) Date: 2012-10-28 13:18 Message: I get this install error with 217 on both Vista 32 and 64, w/ 32bit Python 2.6 on both. Is there a manual install method? I'd like to use the library very much. Thanks. ---------------------------------------------------------------------- Comment By: Glenn Linderman (guruglenn) Date: 2012-07-06 02:05 Message: Build 217.1 works for me. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2012-07-06 00:14 Message: I put a build up at http://starship.python.net/~skippy/downloads/pywin32-217.1.win-amd64-py3.3.exe - it works for me here, but it would be great if anyone experiencing this problem could test it out. It is being slow to upload, so give it 30 mins after this message was posted - the filesize is 8,441,923. I'll make a real release soon... ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2012-07-05 00:36 Message: These problems all appear to be specific to 3.3. Sadly pywin32-217 was built with vc2008 where 3.3 recently moved to vs2010. I'm looking into it... ---------------------------------------------------------------------- Comment By: Glenn Linderman (guruglenn) Date: 2012-07-04 23:28 Message: Just for kicks, I added a print statement in LoadSystemModule in pywin32_postinstall.py, and the module it cannot load, on my system, is c:\python33\Lib\site-packages\pywin32_system32\pywintypes33.dll This probably doesn't surprise you since that is what the comments imply... The file exists in that location. Is there something else I can do to help debug this problem? ---------------------------------------------------------------------- Comment By: Glenn Linderman (guruglenn) Date: 2012-07-04 18:13 Message: I get the same error trying to install pywin32-217.win-amd64-py3.3.exe ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3530195&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-26 00:02:38
|
Bugs item #3562998, was opened at 2012-08-29 14:09 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562998&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Series8217 (series8217) Assigned to: Nobody/Anonymous (nobody) Summary: Python won't exit if win32ui is imported Initial Comment: Environment: Windows 7 64-bit, Python 2.7.3 32-bit, PyWin32-217 This is a weird one. If you run the attached script (you'll need to manually close the file chooser), you'll find that Python does not exit when the script is done. However, if you remove win32ui from the list of imports, the script exits just fine. Also, if the script consists solely of "import win32gui, win32ui", it exits cleanly. I printed a list of threads and it's just the main thread in both cases. Another user on Stack Overflow found that this problem is reproducible by creating and destroying a GTK Window instead of opening a file chooser like I did. See: http://stackoverflow.com/questions/10467225/why-script-doesnt-quit-when-win32ui-is-imported-and-gtk-quits ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-10-25 17:02 Message: > Any suggestions on obtaining additional information from the hung Python > instance I can reproduce on my primary workstation? Only to break into it with msvc or similar debugger - and without debug symbols (ie, without having built it yourself) even that may not give many clues. ---------------------------------------------------------------------- Comment By: Series8217 (series8217) Date: 2012-10-25 09:25 Message: I can't reproduce it on Windows 2008 Server 32-bit SP2 with a fresh install of Python 2.7.3 32-bit and PyWin32-217. I can't reproduce it on my laptop with Windows 7 64-bit SP1 Home Premium, Python 2.7.3 32-bit, and PyWin32-216 nor with Pywin32-217. Any suggestions on obtaining additional information from the hung Python instance I can reproduce on my primary workstation? ---------------------------------------------------------------------- Comment By: Series8217 (series8217) Date: 2012-09-26 13:00 Message: I launched the script by double-clicking on it in Windows. The Python process and console will stay open. Running it from the command line also works: "python test_gfrs240.py". The Python process will stay open instead of returning to the prompt. ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-08-29 16:06 Message: I can't reproduce this. How are you launching the script ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562998&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-25 16:25:07
|
Bugs item #3562998, was opened at 2012-08-29 14:09 Message generated for change (Comment added) made by series8217 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562998&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Series8217 (series8217) Assigned to: Nobody/Anonymous (nobody) Summary: Python won't exit if win32ui is imported Initial Comment: Environment: Windows 7 64-bit, Python 2.7.3 32-bit, PyWin32-217 This is a weird one. If you run the attached script (you'll need to manually close the file chooser), you'll find that Python does not exit when the script is done. However, if you remove win32ui from the list of imports, the script exits just fine. Also, if the script consists solely of "import win32gui, win32ui", it exits cleanly. I printed a list of threads and it's just the main thread in both cases. Another user on Stack Overflow found that this problem is reproducible by creating and destroying a GTK Window instead of opening a file chooser like I did. See: http://stackoverflow.com/questions/10467225/why-script-doesnt-quit-when-win32ui-is-imported-and-gtk-quits ---------------------------------------------------------------------- >Comment By: Series8217 (series8217) Date: 2012-10-25 09:25 Message: I can't reproduce it on Windows 2008 Server 32-bit SP2 with a fresh install of Python 2.7.3 32-bit and PyWin32-217. I can't reproduce it on my laptop with Windows 7 64-bit SP1 Home Premium, Python 2.7.3 32-bit, and PyWin32-216 nor with Pywin32-217. Any suggestions on obtaining additional information from the hung Python instance I can reproduce on my primary workstation? ---------------------------------------------------------------------- Comment By: Series8217 (series8217) Date: 2012-09-26 13:00 Message: I launched the script by double-clicking on it in Windows. The Python process and console will stay open. Running it from the command line also works: "python test_gfrs240.py". The Python process will stay open instead of returning to the prompt. ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-08-29 16:06 Message: I can't reproduce this. How are you launching the script ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562998&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-18 04:59:17
|
Bugs item #3577889, was opened at 2012-10-17 12:11 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3577889&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: win32 Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Andrew Challen (arevelation) Assigned to: Nobody/Anonymous (nobody) Summary: win32gui.GetWindowPlacement showCmd not working Initial Comment: win32gui.GetWindowPlacement returns for a "Command Prompt" window (not tested other window types) (0, 1, (-1, -1), (-1, -1), (125, 125, 802, 467)) SetWindowPlacement hides the window OK, so also does ShowWindow. GetWindowPlacement returns 1 for showCmd regardless of the window state. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-10-17 21:59 Message: I checked the code and the win32gui module is returning what the API returns to us. Also, it works fine with pythonwin: >>> import win32gui >>> win32gui.GetWindowPlacement(win32ui.GetMainFrame().GetSafeHwnd()) I guess it is just related to command-prompts, but either way, I'm convinced there is no pywin32 bug here. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3577889&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-17 19:11:26
|
Bugs item #3577889, was opened at 2012-10-17 12:11 Message generated for change (Tracker Item Submitted) made by arevelation You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3577889&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Andrew Challen (arevelation) Assigned to: Nobody/Anonymous (nobody) Summary: win32gui.GetWindowPlacement showCmd not working Initial Comment: win32gui.GetWindowPlacement returns for a "Command Prompt" window (not tested other window types) (0, 1, (-1, -1), (-1, -1), (125, 125, 802, 467)) SetWindowPlacement hides the window OK, so also does ShowWindow. GetWindowPlacement returns 1 for showCmd regardless of the window state. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3577889&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-15 04:19:47
|
Bugs item #3501250, was opened at 2012-03-10 10:34 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3501250&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: http://jamercee.myopenid.com/ () Assigned to: Nobody/Anonymous (nobody) Summary: Possible bug in win32file.SetFileTime() Initial Comment: It appears there may be a bug in the win32file.SetFileTime() method (or else there's a big bug in my understanding of how this pywin32 method is intended to work). We needed the ability to set the ctime,atime,mtime tuple of windows files. The python standard library method os.utime() only works for ctime,mtime. So we turned to pywin32 -- and foudn the SetFileTime seemed to be exactly what we needed. But it appears win32file.SetFileTime() performs time-zone related transformations that are tripping us up. Specifically, it alters the datetimes it is passed based on the local-system timezone. As a test, we passed the results from win32file.GetFileTime() win32file.SetFileTime(). In our view, this should have done nothing -- but instead it altered the ctime,atime,mtime of the files by advancing the times. I think a quick example can highlight the issue more clearly. Assume the following code is filetest.py: import win32file hnd = win32file.CreateFile('file.txt', win32file.GENERIC_READ | win32file.GENERIC_WRITE, 0, None, win32file.OPEN_EXISTING, 0, None) ct, at, mt = win32file.GetFileTime(hnd) win32file.SetFileTime(hnd, ct, at, mt) hnd.close() We run it like this: C:\> ECHO hi > file.txt C:\> DIR file.txt 03/10/2012 12:55 PM 5 file.txt 1 File(s) 5 bytes C:\> PYTHON filetest.py C:\> DIR file.txt 03/10/2012 05:55 PM 5 file.txt 1 File(s) 5 bytes Our local timezone is EST (which today is GMT-5). Notice the last-write time is now 5-hours in the future (note: so are ctime, and atime, but for brevity, I've omitted the listing). It looks like SetFileTime() assumed it was passed a collection of times that represented localtime, and performed local -> GMT conversion. But this is counter to the documentation available with GetFileTime(). According to MSDN, a FILETIME structure (like those returned from GetFileTime()) is: "...a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)..." http://msdn.microsoft.com/en-us/library/windows/desktop/ms724284(v=vs.85).aspx After spending some head scratching time on this, we hacked up a quick C version to confirm our understanding was correct about GetFileTime/SetFileTime: #include <stdio.h> #include <windows.h> int main() { HANDLE hnd = CreateFile("file.txt", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (hnd == INVALID_HANDLE_VALUE) { printf("error, couldn't open file.txt\n"); return -1; } FILETIME ctime, atime, mtime; if (GetFileTime(hnd, &ctime, &atime, &mtime) == 0) { printf("unable to retrieve filetime(s)"); return -1; } if (SetFileTime(hnd, &ctime, &atime, &mtime) == 0) { printf("unable to set filetime(s)"); return -1; } CloseHandle(hnd); return 0; } This program works exactly as we expected and it does not alter any of the the file times. So we spent some additional time drilling down in the win32file.i swig code. The SetFileTime() declaration starts on line 718. On line 740, it begins processing the arguments passed (with code sections for each of the three times). Here's the one for ctime if (!PyWinObject_AsFILETIME(obTimeCreated, &LocalFileTime)) return NULL; // This sucks! This code is the only code in pywin32 that // blindly converted the result of AsFILETIME to a localtime. // That doesn't make sense in a tz-aware datetime world... if (PyWinTime_DateTimeCheck(obTimeCreated)) TimeCreated = LocalFileTime; else LocalFileTimeToFileTime(&LocalFileTime, &TimeCreated); lpTimeCreated= &TimeCreated; (NOTE: we did NOT add the somewhat offensive "sucks" comment. That was left over from whoever edited this code last) There's quite a bit of moving parts at this level of depth in the pywin32 code -- but it would appear to our superficial understanding that the pywin32 code at this point is converting the time passed to localtime. Is that correct? Has anyone else encountered a problem with win32file.SetFileTime() -- or are we just completely off our nut here? Our test setup: Windows 7 (64-bit) Running Python 2.7.2 (32-bit) pywin32-217 The filesystem we are writting to is NTFS ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-10-14 21:19 Message: That sounds like a great compromise! ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-10-14 21:00 Message: This is a leftover from older systems (95 &98) that stored these dates in local time. I seem to remember this having been discussed before somewhere, and the problem with fixing it was that it was already being used by pre-adjusting the time passed in. Changing it to no longer convert to local time will cause problems for anyone already using it that way. Also, I think FAT file systems may still use local time even now. Maybe we could add a flag to do localtime conversion, and defaults to True so current code continues to work as-is, but new code can use UTC by passing False. ---------------------------------------------------------------------- Comment By: Michael Vincent (venkman11) Date: 2012-10-02 14:11 Message: I'm seeing this behavior also, very annoying. Maybe the word "possible" should be removed from the defect title? It's certainly there. My use case for using this functionality as follows: I'm needing to set file creation times to their modification time so that media file viewers which can't extract this metadata from files (e.g. home videos) can get it from the timestamp. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3501250&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-15 04:00:31
|
Bugs item #3501250, was opened at 2012-03-10 10:34 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3501250&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: http://jamercee.myopenid.com/ () Assigned to: Nobody/Anonymous (nobody) Summary: Possible bug in win32file.SetFileTime() Initial Comment: It appears there may be a bug in the win32file.SetFileTime() method (or else there's a big bug in my understanding of how this pywin32 method is intended to work). We needed the ability to set the ctime,atime,mtime tuple of windows files. The python standard library method os.utime() only works for ctime,mtime. So we turned to pywin32 -- and foudn the SetFileTime seemed to be exactly what we needed. But it appears win32file.SetFileTime() performs time-zone related transformations that are tripping us up. Specifically, it alters the datetimes it is passed based on the local-system timezone. As a test, we passed the results from win32file.GetFileTime() win32file.SetFileTime(). In our view, this should have done nothing -- but instead it altered the ctime,atime,mtime of the files by advancing the times. I think a quick example can highlight the issue more clearly. Assume the following code is filetest.py: import win32file hnd = win32file.CreateFile('file.txt', win32file.GENERIC_READ | win32file.GENERIC_WRITE, 0, None, win32file.OPEN_EXISTING, 0, None) ct, at, mt = win32file.GetFileTime(hnd) win32file.SetFileTime(hnd, ct, at, mt) hnd.close() We run it like this: C:\> ECHO hi > file.txt C:\> DIR file.txt 03/10/2012 12:55 PM 5 file.txt 1 File(s) 5 bytes C:\> PYTHON filetest.py C:\> DIR file.txt 03/10/2012 05:55 PM 5 file.txt 1 File(s) 5 bytes Our local timezone is EST (which today is GMT-5). Notice the last-write time is now 5-hours in the future (note: so are ctime, and atime, but for brevity, I've omitted the listing). It looks like SetFileTime() assumed it was passed a collection of times that represented localtime, and performed local -> GMT conversion. But this is counter to the documentation available with GetFileTime(). According to MSDN, a FILETIME structure (like those returned from GetFileTime()) is: "...a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)..." http://msdn.microsoft.com/en-us/library/windows/desktop/ms724284(v=vs.85).aspx After spending some head scratching time on this, we hacked up a quick C version to confirm our understanding was correct about GetFileTime/SetFileTime: #include <stdio.h> #include <windows.h> int main() { HANDLE hnd = CreateFile("file.txt", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (hnd == INVALID_HANDLE_VALUE) { printf("error, couldn't open file.txt\n"); return -1; } FILETIME ctime, atime, mtime; if (GetFileTime(hnd, &ctime, &atime, &mtime) == 0) { printf("unable to retrieve filetime(s)"); return -1; } if (SetFileTime(hnd, &ctime, &atime, &mtime) == 0) { printf("unable to set filetime(s)"); return -1; } CloseHandle(hnd); return 0; } This program works exactly as we expected and it does not alter any of the the file times. So we spent some additional time drilling down in the win32file.i swig code. The SetFileTime() declaration starts on line 718. On line 740, it begins processing the arguments passed (with code sections for each of the three times). Here's the one for ctime if (!PyWinObject_AsFILETIME(obTimeCreated, &LocalFileTime)) return NULL; // This sucks! This code is the only code in pywin32 that // blindly converted the result of AsFILETIME to a localtime. // That doesn't make sense in a tz-aware datetime world... if (PyWinTime_DateTimeCheck(obTimeCreated)) TimeCreated = LocalFileTime; else LocalFileTimeToFileTime(&LocalFileTime, &TimeCreated); lpTimeCreated= &TimeCreated; (NOTE: we did NOT add the somewhat offensive "sucks" comment. That was left over from whoever edited this code last) There's quite a bit of moving parts at this level of depth in the pywin32 code -- but it would appear to our superficial understanding that the pywin32 code at this point is converting the time passed to localtime. Is that correct? Has anyone else encountered a problem with win32file.SetFileTime() -- or are we just completely off our nut here? Our test setup: Windows 7 (64-bit) Running Python 2.7.2 (32-bit) pywin32-217 The filesystem we are writting to is NTFS ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2012-10-14 21:00 Message: This is a leftover from older systems (95 &98) that stored these dates in local time. I seem to remember this having been discussed before somewhere, and the problem with fixing it was that it was already being used by pre-adjusting the time passed in. Changing it to no longer convert to local time will cause problems for anyone already using it that way. Also, I think FAT file systems may still use local time even now. Maybe we could add a flag to do localtime conversion, and defaults to True so current code continues to work as-is, but new code can use UTC by passing False. ---------------------------------------------------------------------- Comment By: Michael Vincent (venkman11) Date: 2012-10-02 14:11 Message: I'm seeing this behavior also, very annoying. Maybe the word "possible" should be removed from the defect title? It's certainly there. My use case for using this functionality as follows: I'm needing to set file creation times to their modification time so that media file viewers which can't extract this metadata from files (e.g. home videos) can get it from the timestamp. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3501250&group_id=78018 |
From: Mark H. <mha...@sk...> - 2012-10-07 11:11:08
|
This mailing list is only for automated messages from the bug tracker. Please post to the pyt...@py... mailing list for help and support. Mark On 7/10/2012 7:37 PM, klo uo wrote: > Hi, > > I ported small script which works without issues in regular Python (2.7 > on Windows XP) but raises this error when run from application > automation (using ActiveX obviously), and I can't understand what it > wants to tell me: > > ======================================== > -2147352567, 'Exception occurred.', > (0, u'Python COM Server Internal Error', u'Unexpected Python Error: > Traceback (most recent call last): > File "C:\\Python27\\lib\\site-packages\\win32com\\server\\policy.py", > line 324, in _InvokeEx_ > return self._invokeex_(dispid, lcid, wFlags, args, kwargs, > serviceProvider) > File "C:\\Python27\\lib\\site-packages\\win32com\\server\\policy.py", > line 585, in _invokeex_ > return func(*args) > File > "C:\\Python27\\lib\\site-packages\\win32comext\\axscript\\client\\framework.py", > line 580, in SetScriptSite > self.lcid = site.GetLCID() > AttributeError: \'NoneType\' object has no attribute \'GetLCID\' > ', None, 0, -2147352571), 3) > ======================================== > > Thanks > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > > _______________________________________________ > pywin32-bugs mailing list > pyw...@li... > https://lists.sourceforge.net/lists/listinfo/pywin32-bugs > |
From: klo uo <kl...@gm...> - 2012-10-07 08:37:19
|
Hi, I ported small script which works without issues in regular Python (2.7 on Windows XP) but raises this error when run from application automation (using ActiveX obviously), and I can't understand what it wants to tell me: ======================================== -2147352567, 'Exception occurred.', (0, u'Python COM Server Internal Error', u'Unexpected Python Error: Traceback (most recent call last): File "C:\\Python27\\lib\\site-packages\\win32com\\server\\policy.py", line 324, in _InvokeEx_ return self._invokeex_(dispid, lcid, wFlags, args, kwargs, serviceProvider) File "C:\\Python27\\lib\\site-packages\\win32com\\server\\policy.py", line 585, in _invokeex_ return func(*args) File "C:\\Python27\\lib\\site-packages\\win32comext\\axscript\\client\\framework.py", line 580, in SetScriptSite self.lcid = site.GetLCID() AttributeError: \'NoneType\' object has no attribute \'GetLCID\' ', None, 0, -2147352571), 3) ======================================== Thanks |
From: SourceForge.net <no...@so...> - 2012-10-04 20:55:22
|
Bugs item #3562879, was opened at 2012-08-29 08:34 Message generated for change (Comment added) made by spaniard81 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562879&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: com Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Raveesh (spaniard81) Assigned to: Nobody/Anonymous (nobody) Summary: win32com and PAMIE 3 Initial Comment: I am trying to run the Simple Example to automate a google search on "Python" http://mail.python.org/pipermail/python-announce-list/2009-March/007279.html ###################################################### from PAM30 import PAMIE ie = PAMIE() ie.navigate("google.com") ie.setTextBox("q", "python") ie.clickButton("Google Search") ie.clickLink("Python Programming Language -- Official Website") ###################################################### I have the exact same setup as mentioned in the note by Rob Marchetti. Note:This version only only works with Python 3.0 on Windows and requires Mark Hammond's pywin32 for Python3.0 - pywin32-213.win32-py3.0.exe But i get the following error: TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) Details: Traceback (most recent call last): File "testPAM.py", line 10, in <module> ie.setTextBox("q", "python") File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 2093, in setTextBox foundElement = self.getTextBox(name) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 1717, in getTextBox foundElement = self.findElement("input", "id;name;value", name) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 445, in findElement elements = self.getElementsList(tag) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 939, in getElementsList elements = self._ie.Document.getElementsByTagName(tag) TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) Python on my machine: Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 The bug has also been reported on http://stackoverflow.com/questions/11580340/typeerror-with-pamie with no solution! ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-10-04 13:55 Message: also PAM30.py is not compatible with Python 3 or higher versions. One will need to do some code modifications in PAM30.py like include new packages instead of the existing ones, and modify the print statements to the new print() function. But this is not as bad as the issues with IE 9. I will try to revert my IE to earlier versions. ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-10-04 13:51 Message: As Jérome Laheurte (fraca7) mentioned this this appears to be an issue with Internet Explorer 9. I ran the same code on my Win Vista a week back and the code worked. I presume i still had IE 8 or earlier version on my machine. However, since the last Win update it appears IE 9 has been installed on my machine and this stops working again. ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-09-16 21:56 Message: Thanks. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2012-09-16 16:55 Message: I'll try and look into this soon. ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-09-16 02:20 Message: This is still "pending"... Should I open another bug report for my own situation ? ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-08-30 04:51 Message: This has nothing to do with Python 3 or PAM. I get the same error using this script (with Python 2.2, win32all build 210, as well as Python 2.5 and win32all build 217). It only happens with MSIE 9. Fun thing is that on a site like Baidu (commented line here), which uses compatibility mode IFAIK, it works. Tested on Win7 Ultimate 32 bits. import win32com.client import time ie = win32com.client.Dispatch('InternetExplorer.Application.1') try: ie.Visible = 1 ie.Navigate("http://www.google.com") # ie.Navigate("http://www.baidu.com") while ie.Busy: time.sleep(1) print ie.Document.getElementsByTagName("a") finally: ie.Quit() ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-08-30 02:22 Message: i am running this on a 64bit Win7, Intel machine, if that has anything to do with this. ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-08-30 02:21 Message: Hi, following you suggestion i upgraded to Python 3.x. Here is the exact version: Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win32 And i have installed pywin32-217.win32-py3.2 from sourceforge I still get the same TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-08-29 09:03 Message: The first thing to try is using a newer version of Python 3. There were enough problems with Python 3.0 that pywin32 is no longer released for it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562879&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-04 20:51:49
|
Bugs item #3562879, was opened at 2012-08-29 08:34 Message generated for change (Comment added) made by spaniard81 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562879&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: com Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Raveesh (spaniard81) Assigned to: Nobody/Anonymous (nobody) Summary: win32com and PAMIE 3 Initial Comment: I am trying to run the Simple Example to automate a google search on "Python" http://mail.python.org/pipermail/python-announce-list/2009-March/007279.html ###################################################### from PAM30 import PAMIE ie = PAMIE() ie.navigate("google.com") ie.setTextBox("q", "python") ie.clickButton("Google Search") ie.clickLink("Python Programming Language -- Official Website") ###################################################### I have the exact same setup as mentioned in the note by Rob Marchetti. Note:This version only only works with Python 3.0 on Windows and requires Mark Hammond's pywin32 for Python3.0 - pywin32-213.win32-py3.0.exe But i get the following error: TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) Details: Traceback (most recent call last): File "testPAM.py", line 10, in <module> ie.setTextBox("q", "python") File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 2093, in setTextBox foundElement = self.getTextBox(name) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 1717, in getTextBox foundElement = self.findElement("input", "id;name;value", name) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 445, in findElement elements = self.getElementsList(tag) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 939, in getElementsList elements = self._ie.Document.getElementsByTagName(tag) TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) Python on my machine: Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 The bug has also been reported on http://stackoverflow.com/questions/11580340/typeerror-with-pamie with no solution! ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-10-04 13:51 Message: As Jérome Laheurte (fraca7) mentioned this this appears to be an issue with Internet Explorer 9. I ran the same code on my Win Vista a week back and the code worked. I presume i still had IE 8 or earlier version on my machine. However, since the last Win update it appears IE 9 has been installed on my machine and this stops working again. ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-09-16 21:56 Message: Thanks. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2012-09-16 16:55 Message: I'll try and look into this soon. ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-09-16 02:20 Message: This is still "pending"... Should I open another bug report for my own situation ? ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-08-30 04:51 Message: This has nothing to do with Python 3 or PAM. I get the same error using this script (with Python 2.2, win32all build 210, as well as Python 2.5 and win32all build 217). It only happens with MSIE 9. Fun thing is that on a site like Baidu (commented line here), which uses compatibility mode IFAIK, it works. Tested on Win7 Ultimate 32 bits. import win32com.client import time ie = win32com.client.Dispatch('InternetExplorer.Application.1') try: ie.Visible = 1 ie.Navigate("http://www.google.com") # ie.Navigate("http://www.baidu.com") while ie.Busy: time.sleep(1) print ie.Document.getElementsByTagName("a") finally: ie.Quit() ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-08-30 02:22 Message: i am running this on a 64bit Win7, Intel machine, if that has anything to do with this. ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-08-30 02:21 Message: Hi, following you suggestion i upgraded to Python 3.x. Here is the exact version: Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win32 And i have installed pywin32-217.win32-py3.2 from sourceforge I still get the same TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-08-29 09:03 Message: The first thing to try is using a newer version of Python 3. There were enough problems with Python 3.0 that pywin32 is no longer released for it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562879&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-04 17:57:58
|
Bugs item #3574188, was opened at 2012-10-03 10:42 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3574188&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: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Tim Golden (tjgolden) Assigned to: Nobody/Anonymous (nobody) Summary: Failing to build against Python 3.3.0 Initial Comment: Current tip (4363710e738e) is failing to build against Python 3.3.0. Output: com/win32comext/shell/src/shell.cpp(586) : error C2664: 'PyWinObject_AsResourceIdW' : cannot convert parameter 2 from 'char **' to 'WCHAR **' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast error: command '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2 ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2012-10-04 10:57 Message: Fixed by using PyWinObject_AsResourceIdA, since the Verb is always plain char. ---------------------------------------------------------------------- Comment By: Tim Golden (tjgolden) Date: 2012-10-03 11:42 Message: Switching the cast at line 586 to a (TCHAR *) allowed the build to succeed. I haven't tried running any of the tests yet. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3574188&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-03 18:42:52
|
Bugs item #3574188, was opened at 2012-10-03 10:42 Message generated for change (Comment added) made by tjgolden You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3574188&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Tim Golden (tjgolden) Assigned to: Nobody/Anonymous (nobody) Summary: Failing to build against Python 3.3.0 Initial Comment: Current tip (4363710e738e) is failing to build against Python 3.3.0. Output: com/win32comext/shell/src/shell.cpp(586) : error C2664: 'PyWinObject_AsResourceIdW' : cannot convert parameter 2 from 'char **' to 'WCHAR **' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast error: command '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2 ---------------------------------------------------------------------- >Comment By: Tim Golden (tjgolden) Date: 2012-10-03 11:42 Message: Switching the cast at line 586 to a (TCHAR *) allowed the build to succeed. I haven't tried running any of the tests yet. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3574188&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-03 17:43:00
|
Bugs item #3574188, was opened at 2012-10-03 10:42 Message generated for change (Tracker Item Submitted) made by tjgolden You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3574188&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Tim Golden (tjgolden) Assigned to: Nobody/Anonymous (nobody) Summary: Failing to build against Python 3.3.0 Initial Comment: Current tip (4363710e738e) is failing to build against Python 3.3.0. Output: com/win32comext/shell/src/shell.cpp(586) : error C2664: 'PyWinObject_AsResourceIdW' : cannot convert parameter 2 from 'char **' to 'WCHAR **' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast error: command '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3574188&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-02 21:11:03
|
Bugs item #3501250, was opened at 2012-03-10 10:34 Message generated for change (Comment added) made by venkman11 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3501250&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: http://jamercee.myopenid.com/ () Assigned to: Nobody/Anonymous (nobody) Summary: Possible bug in win32file.SetFileTime() Initial Comment: It appears there may be a bug in the win32file.SetFileTime() method (or else there's a big bug in my understanding of how this pywin32 method is intended to work). We needed the ability to set the ctime,atime,mtime tuple of windows files. The python standard library method os.utime() only works for ctime,mtime. So we turned to pywin32 -- and foudn the SetFileTime seemed to be exactly what we needed. But it appears win32file.SetFileTime() performs time-zone related transformations that are tripping us up. Specifically, it alters the datetimes it is passed based on the local-system timezone. As a test, we passed the results from win32file.GetFileTime() win32file.SetFileTime(). In our view, this should have done nothing -- but instead it altered the ctime,atime,mtime of the files by advancing the times. I think a quick example can highlight the issue more clearly. Assume the following code is filetest.py: import win32file hnd = win32file.CreateFile('file.txt', win32file.GENERIC_READ | win32file.GENERIC_WRITE, 0, None, win32file.OPEN_EXISTING, 0, None) ct, at, mt = win32file.GetFileTime(hnd) win32file.SetFileTime(hnd, ct, at, mt) hnd.close() We run it like this: C:\> ECHO hi > file.txt C:\> DIR file.txt 03/10/2012 12:55 PM 5 file.txt 1 File(s) 5 bytes C:\> PYTHON filetest.py C:\> DIR file.txt 03/10/2012 05:55 PM 5 file.txt 1 File(s) 5 bytes Our local timezone is EST (which today is GMT-5). Notice the last-write time is now 5-hours in the future (note: so are ctime, and atime, but for brevity, I've omitted the listing). It looks like SetFileTime() assumed it was passed a collection of times that represented localtime, and performed local -> GMT conversion. But this is counter to the documentation available with GetFileTime(). According to MSDN, a FILETIME structure (like those returned from GetFileTime()) is: "...a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)..." http://msdn.microsoft.com/en-us/library/windows/desktop/ms724284(v=vs.85).aspx After spending some head scratching time on this, we hacked up a quick C version to confirm our understanding was correct about GetFileTime/SetFileTime: #include <stdio.h> #include <windows.h> int main() { HANDLE hnd = CreateFile("file.txt", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (hnd == INVALID_HANDLE_VALUE) { printf("error, couldn't open file.txt\n"); return -1; } FILETIME ctime, atime, mtime; if (GetFileTime(hnd, &ctime, &atime, &mtime) == 0) { printf("unable to retrieve filetime(s)"); return -1; } if (SetFileTime(hnd, &ctime, &atime, &mtime) == 0) { printf("unable to set filetime(s)"); return -1; } CloseHandle(hnd); return 0; } This program works exactly as we expected and it does not alter any of the the file times. So we spent some additional time drilling down in the win32file.i swig code. The SetFileTime() declaration starts on line 718. On line 740, it begins processing the arguments passed (with code sections for each of the three times). Here's the one for ctime if (!PyWinObject_AsFILETIME(obTimeCreated, &LocalFileTime)) return NULL; // This sucks! This code is the only code in pywin32 that // blindly converted the result of AsFILETIME to a localtime. // That doesn't make sense in a tz-aware datetime world... if (PyWinTime_DateTimeCheck(obTimeCreated)) TimeCreated = LocalFileTime; else LocalFileTimeToFileTime(&LocalFileTime, &TimeCreated); lpTimeCreated= &TimeCreated; (NOTE: we did NOT add the somewhat offensive "sucks" comment. That was left over from whoever edited this code last) There's quite a bit of moving parts at this level of depth in the pywin32 code -- but it would appear to our superficial understanding that the pywin32 code at this point is converting the time passed to localtime. Is that correct? Has anyone else encountered a problem with win32file.SetFileTime() -- or are we just completely off our nut here? Our test setup: Windows 7 (64-bit) Running Python 2.7.2 (32-bit) pywin32-217 The filesystem we are writting to is NTFS ---------------------------------------------------------------------- Comment By: Michael Vincent (venkman11) Date: 2012-10-02 14:11 Message: I'm seeing this behavior also, very annoying. Maybe the word "possible" should be removed from the defect title? It's certainly there. My use case for using this functionality as follows: I'm needing to set file creation times to their modification time so that media file viewers which can't extract this metadata from files (e.g. home videos) can get it from the timestamp. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3501250&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-10-02 19:32:00
|
Bugs item #3496224, was opened at 2012-03-02 00:38 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3496224&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: pythonwin Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: honyczek (honyczek) Assigned to: Mark Hammond (mhammond) Summary: AssertionError: assert sys.modules[modname] is old_mod Initial Comment: This problem is opened at ID #2905909. I want to attach file, which tells what is in old_mod and mod variables. This problem has been described by me at: http://stackoverflow.com/questions/9479239/running-two-django-apps-on-apache-with-mod-auth-sspi-and-mod-wsgi ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2012-10-02 12:31 Message: It appears mod-wsgi is using multiple python interpreters, which pywin32 doesn't support. Just commenting out the assert may lead to a number of problems when the second interpreter uses objects created in the first. However, this same error can also happen when reloading pywintypes in python 3. I'll see if I can find a way to make sure reloading works. ---------------------------------------------------------------------- Comment By: honyczek (honyczek) Date: 2012-06-07 01:07 Message: this link has a solution: http://stackoverflow.com/questions/5969669/multiple-django-sites-on-apache-windows-mod-wsgi-problem-with-win32 but why is this required to get it working? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3496224&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-09-27 05:40:11
|
Bugs item #3572129, was opened at 2012-09-26 19:36 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3572129&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: win32 Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: win32api.UpdateResource should support resource deletion Initial Comment: Windows api UpdateResource() can be used to delete a resource if 5th parameter is NULL, win32api.UpdateResource should also support it. Currently obData must be a non-empty buffer. ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2012-09-26 22:40 Message: Fixed in win32apimodule.cpp r4276 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3572129&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-09-27 02:36:26
|
Bugs item #3572129, was opened at 2012-09-26 19:36 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3572129&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: win32api.UpdateResource should support resource deletion Initial Comment: Windows api UpdateResource() can be used to delete a resource if 5th parameter is NULL, win32api.UpdateResource should also support it. Currently obData must be a non-empty buffer. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3572129&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-09-26 20:00:17
|
Bugs item #3562998, was opened at 2012-08-29 14:09 Message generated for change (Comment added) made by series8217 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562998&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Series8217 (series8217) Assigned to: Nobody/Anonymous (nobody) Summary: Python won't exit if win32ui is imported Initial Comment: Environment: Windows 7 64-bit, Python 2.7.3 32-bit, PyWin32-217 This is a weird one. If you run the attached script (you'll need to manually close the file chooser), you'll find that Python does not exit when the script is done. However, if you remove win32ui from the list of imports, the script exits just fine. Also, if the script consists solely of "import win32gui, win32ui", it exits cleanly. I printed a list of threads and it's just the main thread in both cases. Another user on Stack Overflow found that this problem is reproducible by creating and destroying a GTK Window instead of opening a file chooser like I did. See: http://stackoverflow.com/questions/10467225/why-script-doesnt-quit-when-win32ui-is-imported-and-gtk-quits ---------------------------------------------------------------------- >Comment By: Series8217 (series8217) Date: 2012-09-26 13:00 Message: I launched the script by double-clicking on it in Windows. The Python process and console will stay open. Running it from the command line also works: "python test_gfrs240.py". The Python process will stay open instead of returning to the prompt. ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-08-29 16:06 Message: I can't reproduce this. How are you launching the script ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562998&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-09-26 09:31:13
|
Bugs item #3571828, was opened at 2012-09-26 01:04 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3571828&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: win32 Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: spiros (sspiros) Assigned to: Nobody/Anonymous (nobody) Summary: import win32ui hangs openoffice Initial Comment: When trying to do a plain import win32ui inside a python macro script, the whole office suite hangs and I have to kill it. When using console everything works fine. (I installed it the first time by drag-dropping the site-packages contents inside the oo-python Second time totally removed system python and using a script pointed the oo-python registry to the win32 installer. Installed succesfully.) pywin32 build 214 to 217 python 2.6 and 2.6.1 openoffice 3.4.1, libreoffice 3.5 - 3.6 windows xp, 2003 ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-09-26 02:31 Message: Sorry, but importing win32ui in other GUI environments (being IDLE, wxPython, Open Office or anything else) simply isn't supported - the issue will be that the MFC libs behind win32ui want full control of event loops and they always get in each others way... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3571828&group_id=78018 |
From: SourceForge.net <no...@so...> - 2012-09-26 08:04:24
|
Bugs item #3571828, was opened at 2012-09-26 01:04 Message generated for change (Tracker Item Submitted) made by sspiros You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3571828&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: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: spiros (sspiros) Assigned to: Nobody/Anonymous (nobody) Summary: import win32ui hangs openoffice Initial Comment: When trying to do a plain import win32ui inside a python macro script, the whole office suite hangs and I have to kill it. When using console everything works fine. (I installed it the first time by drag-dropping the site-packages contents inside the oo-python Second time totally removed system python and using a script pointed the oo-python registry to the win32 installer. Installed succesfully.) pywin32 build 214 to 217 python 2.6 and 2.6.1 openoffice 3.4.1, libreoffice 3.5 - 3.6 windows xp, 2003 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3571828&group_id=78018 |