Excellent! Thanks Florian. I updated my hooks file and now I have a
working application again.

Next step is to move from python 2.5 to 2.6 !!!

Stephen

2009/7/27 Florian Höch <[email protected]>:
>
> Hello,
>
> I can confirm the problem. It seems the pyodbc hook is incomplete when
> using a recent version of pyodbc. I looked at the pyodbc sources and
> found some imports that are missing in the hook, so I added them:
>
> hiddenimports = ['datetime', 'decimal', 'hashlib', 'locale']
>
> This seems to solve it (didn't test it extensively).
>
> Regards,
>
> Florian Höch
>
> Stephen Dolan schrieb:
>> Hi All,
>>
>> I've been using pyinstaller 1.3 for a while on my project with no
>> problems. My project makes use of pyodbc for database access. On
>> Friday, I tried moving to the latest version of pyinstaller on svn
>> trunk, but now I can't get my app to run when compiled with
>> pyinstaller. It always gives me the error:
>>
>> !RuntimeError: Unable to import decimal
>>
>> even though 'decimal' is in the pyodbc-hooks.py file.
>>
>> In fact, even when I create a very basic script like this (with
>> decimal imported explicitly):
>>
>> import sys
>> if __name__ == "__main__":
>>     import decimal
>>     import pyodbc
>>
>>     try:
>>         cnxn = pyodbc.connect("DSN=MSSQL-PYTHON")
>>     except:
>>         print "Exception raised:",sys.exc_info()
>>     sys.exit(0)
>>
>> I cannot get it to run when compiled with pyinstaller. I always get
>> the same "Unable to import decimal" message.
>>
>> Has anyone else out there got an app that uses pyodbc to run under a
>> pyinstaller version later than the 1.3 release?
>>
>> Thanks for the help!
>>
>> Stephen
>>
>> >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to