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

Vernon D. Cole vernondcole at gmail.com
Fri Mar 21 09:35:55 CET 2014


Argh!  I personally had not gotten around to trying Python 3.4 yet.  The
pythoncom package is widely used and I can't imagine that the lack of it
got past our normal QA tests. I will check on this as soon as I get off
work.

 In the meantime, you should be able to have many versions of python loaded
in parallel on your machine (I have around 7, usually) so you can reload
3.3 and use the *Python Launcher for Windows* to switch between versions.
Use...

> py -3 myprogram.py  # runs the highest numbered Python 3
>
or...

> py -3.3 myprogram.py  # runs version 3.3
>



On Thu, Mar 20, 2014 at 6:05 PM, Sibylle Koczian <nulla.epistola at web.de>wrote:

> 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
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140321/8420f082/attachment.html>


More information about the python-win32 mailing list