using the odbc module (from win32all), dbi.pyd is
copied, but not in the library.zip : no dbi.pyo! thus
Logged In: YES
Does it work when you write it in this way:
I have observed no problem with 0.6.5 but with 0.6.6 the problem occurs:
if __name__ == '__main__':
console = ['test_odbc.py']
Traceback (most recent call last):
File "test_odbc.py", line 2, in <module>
File "odbc.pyc", line 12, in <module>
File "odbc.pyc", line 10, in __load
odbc: Cannot import dbi module
I have tried to find the difference between 0.6.5 and 0.6.6 that causes the error and found
that the import works if I replace the run.exe from 0.6.6 by the one of 0.6.5
in the site-packages\py2exe directory.
So I suppose the problem is not in the packageing itself but in the way modules are loaded
in the resulting .exe file.
It works with 0.6.6 if I import dbi before importing odbc as suggested in the comment.
Log in to post a comment.