pywintypes hook - file already exists but should not warning

369 views
Skip to first unread message

Grant Paton-Simpson

unread,
Sep 17, 2012, 4:32:51 PM9/17/12
to pyins...@googlegroups.com
Hi Martin,

I am reposting this under a fresh topic so it doesn't get lost.

I can see from https://github.com/pyinstaller/pyinstaller/commits/develop/PyInstaller/hooks/hook-pywintypes.py that you are the person who has been working on hook-pywintypes this year. Thanks for your work to improve pyinstaller.

What would you advise I do to prevent the following error: "WARNING: file already exists but should not: C:/DOCUMEN~1/GRANTP~1/LOCALS~
1/Temp/_MEI1922\.\pywintypes27.dll" ? Should I revert to the version of hook-pywintypes.py in May 30th?

Or is there a better solution which you are planning to add to the hook?

Sorry for being so persistent - I need the dev version of pyinstaller to work so I can put out a release of my SOFA Statistics application. If you recall, it seems that version 2.0 has been triggering anti-trojan warnings on a couple of virus scanners. Thus my attempt to use the dev version.

All the best,
Grant

Grant Paton-Simpson

unread,
Sep 19, 2012, 7:08:25 PM9/19/12
to pyins...@googlegroups.com
Hi Martin,

I have tried the following and it seems to have worked. In hook-pywintypes.py I replaced:

datas = [(get_module_file_attribute('pywintypes'), '.')]

with:

import sys
datas = [(get_module_file_attribute('pywintypes%d%d' % sys.version_info[:2]), '.')]

so hookutils looks for pywintypes27.dll not pywintypes.dll

I got the idea from the earlier version of hook_pywintypes.py. Do you think this a good solution?

All the best,
Grant
--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyinstaller/-/sS-VJGRoNyYJ.
To post to this group, send email to pyins...@googlegroups.com.
To unsubscribe from this group, send email to pyinstaller...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.

simon2k

unread,
Nov 13, 2012, 12:16:11 PM11/13/12
to pyins...@googlegroups.com
Hi all,

got the same issue in here using the actual development revision.
So I used the same fix for hook-pywintypes.py and it worked very well.
So again the question: Will there soon be a better solution about this or should we write a official bug report?

Greetings,
Simon

Martin Zibricky

unread,
Nov 13, 2012, 2:33:05 PM11/13/12
to pyins...@googlegroups.com
Could you try remove the following line from hook-pywintypes.py and let
me know if pywintypesXX.dll is still available in your dist dir?

datas = [(get_module_file_attribute('pywintypes'), '.')]


simon2k píše v Út 13. 11. 2012 v 09:16 -0800:

simon2k

unread,
Nov 14, 2012, 4:41:22 AM11/14/12
to pyins...@googlegroups.com
Hi Martin,

In my test-skript I only imported win32com
after removing the line from hook-pywintypes.py, the pywintypes27.dll is still available in mit dist dir.
So the importhook is unnecessary in this case.

But importing only pywintypes27.dll itself, the hook is still needed.

Taking a closer look a the imptracker.py it seems like pywintypes27.dll is put into the dist for multiple times from analyzing win32com, win32.com.client and win32com.server.

Could there be the source of the problem?

Greetings,
Simon

francis

unread,
Nov 17, 2012, 11:07:22 AM11/17/12
to unsub...@googlegroups.com, pyins...@googlegroups.com
Please unsubscribe me from this group.
--
You received this message because you are subscribed to the Google
Groups "PyInstaller" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pyinstaller/-/H5NacvIfgQYJ.

simon2k

unread,
Nov 22, 2012, 2:58:15 AM11/22/12
to pyins...@googlegroups.com
Hi Martin,
is there a a solution, yet?


Am Dienstag, 13. November 2012 20:33:13 UTC+1 schrieb Martin Z:

simon2k

unread,
Nov 27, 2012, 10:30:45 AM11/27/12
to pyins...@googlegroups.com
push^^
Reply all
Reply to author
Forward
0 new messages