[python-win32] Python 3.4: adodbapi.connect(..) crashes

Sibylle Koczian nulla.epistola at web.de
Thu Mar 20 18:05:45 CET 2014


Hello,

I just changed from Python 3.3 to 3.4, installed 
pywin32-218.win-amd64-py3.4.exe and tried to execute a script that 
definitely worked two weeks ago. No other changes, but now I get this 
exception:


Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 
bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
 >>> import adodbapi
 >>> cConnform = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};"
 >>> cAccName = r"D:\home\Sibylle\Dokumente\OOo_db\MedienEDV.mdb"
 >>> accessconnstr = cConnform.format(cAccName)
 >>> accessconnstr
'Provider=Microsoft.ACE.OLEDB.12.0;Data 
Source=D:\\home\\Sibylle\\Dokumente\\OOo_db\\MedienEDV.mdb;'
 >>> accessconn = adodbapi.connect(accessconnstr)
Traceback (most recent call last):
   File "C:\Python34\lib\site-packages\adodbapi\adodbapi.py", line 295, 
in connect
     pythoncom.CoInitialize()             #v2.1 Paj
NameError: name 'pythoncom' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "<pyshell#5>", line 1, in <module>
     accessconn = adodbapi.connect(accessconnstr)
   File "C:\Python34\lib\site-packages\adodbapi\adodbapi.py", line 298, 
in connect
     raise InterfaceError #Probably COM Error
adodbapi.adodbapi.InterfaceError
 >>>

Windows 7, 64bit, no MS Office on this machine, the provider is 
installed (and usable from a .NET application).

To me this exception looks as if the import of pythoncom didn't happen, 
but I can't understand why not. Googling didn't get me anything - 
probably the problem is too new. What can I do?

Thank you for help,
Sibylle


More information about the python-win32 mailing list