#23 pack pymssql ext error.

open
nobody
None
5
2009-08-12
2009-08-12
Anonymous
No

I used pymssql extention for my python script to connect MSSQL.

[code]
import pymssql
import sys, time
def main():
try:
conerp = pymssql.connect(host='127.0.0.1,1433', user='sa', password='', database='tempdb')
conerp.close()
time.sleep(5)
except Exception :
print 'Connect Error'
sys.exit(1)

if __name__ == '__main__':
main()
[/code]

Runing the .exe file, Traceback Message:

File "pymssql.pyc", line 30, in <module>
File "_mssql.pyc", line 12, in <module>
File "_mssql.pyc", line 10, in __load
ImportError: No module named decimal

I copy the decimal.pyc into library.zip and copy ntwdblib.dll to the .exe file's directory. It's work now.

It's py2exe bug? or not??

Discussion