Re: [cx-oracle-users] Using cx_Oracle 6.0rc1 on Windows
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2017-07-04 14:35:12
|
On Tue, Jul 4, 2017 at 3:18 AM, Walter Dörwald <wa...@li...> wrote: > On 3 Jul 2017, at 15:59, Anthony Tuininga wrote: > > Hi Walter, >> >> DPI_DEBUG_LEVEL=7 causes a bunch of output that tells me which public >> ODPI-C functions are being called. The fact that you are not getting any >> at >> all suggests something is going wrong even before cx_Oracle code is >> involved. Can you try a few more things? >> >> 1) Use python -v so you can see if the error is occurring prior to the >> actual import of cx_Oracle (it may not help but it might, too) >> > > Here is the output of importing cx_Oracle in a verbose Python session: > > ============================================================ > ==================== > > import cx_Oracle >>>> >>> # c:\programme\python36\lib\__pycache__\datetime.cpython-36.pyc matches > c:\programme\python36\lib\datetime.py > # code object from 'c:\\programme\\python36\\lib\ > \__pycache__\\datetime.cpython-36.pyc' > import 'time' # <class '_frozen_importlib.BuiltinImporter'> > import 'math' # <class '_frozen_importlib.BuiltinImporter'> > import '_datetime' # <class '_frozen_importlib.BuiltinImporter'> > import 'datetime' # <_frozen_importlib_external.SourceFileLoader object > at 0x000002C295D11550> > # c:\programme\python36\lib\__pycache__\decimal.cpython-36.pyc matches > c:\programme\python36\lib\decimal.py > # code object from 'c:\\programme\\python36\\lib\ > \__pycache__\\decimal.cpython-36.pyc' > # c:\programme\python36\lib\__pycache__\numbers.cpython-36.pyc matches > c:\programme\python36\lib\numbers.py > # code object from 'c:\\programme\\python36\\lib\ > \__pycache__\\numbers.cpython-36.pyc' > import 'numbers' # <_frozen_importlib_external.SourceFileLoader object at > 0x000002C295E40748> > # c:\programme\python36\lib\collections\__pycache__\__init__.cpython-36.pyc > matches c:\programme\python36\lib\collections\__init__.py > # code object from 'c:\\programme\\python36\\lib\ > \collections\\__pycache__\\__init__.cpython-36.pyc' > # c:\programme\python36\lib\__pycache__\operator.cpython-36.pyc matches > c:\programme\python36\lib\operator.py > # code object from 'c:\\programme\\python36\\lib\ > \__pycache__\\operator.cpython-36.pyc' > import '_operator' # <class '_frozen_importlib.BuiltinImporter'> > import 'operator' # <_frozen_importlib_external.SourceFileLoader object > at 0x000002C295E58EF0> > # c:\programme\python36\lib\__pycache__\keyword.cpython-36.pyc matches > c:\programme\python36\lib\keyword.py > # code object from 'c:\\programme\\python36\\lib\ > \__pycache__\\keyword.cpython-36.pyc' > import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at > 0x000002C295E67240> > # c:\programme\python36\lib\__pycache__\heapq.cpython-36.pyc matches > c:\programme\python36\lib\heapq.py > # code object from 'c:\\programme\\python36\\lib\ > \__pycache__\\heapq.cpython-36.pyc' > import '_heapq' # <class '_frozen_importlib.BuiltinImporter'> > import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at > 0x000002C295E67A58> > import 'itertools' # <class '_frozen_importlib.BuiltinImporter'> > # c:\programme\python36\lib\__pycache__\reprlib.cpython-36.pyc matches > c:\programme\python36\lib\reprlib.py > # code object from 'c:\\programme\\python36\\lib\ > \__pycache__\\reprlib.cpython-36.pyc' > import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at > 0x000002C295E67FD0> > import '_collections' # <class '_frozen_importlib.BuiltinImporter'> > import 'collections' # <_frozen_importlib_external.SourceFileLoader > object at 0x000002C295E30828> > # extension module '_decimal' loaded from 'c:\\programme\\python36\\DLLs > \\_decimal.pyd' > # extension module '_decimal' executed from 'c:\\programme\\python36\\DLLs > \\_decimal.pyd' > import '_decimal' # <_frozen_importlib_external.ExtensionFileLoader > object at 0x000002C295D117F0> > import 'decimal' # <_frozen_importlib_external.SourceFileLoader object at > 0x000002C295D116A0> > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "<frozen importlib._bootstrap>", line 961, in _find_and_load > File "<frozen importlib._bootstrap>", line 950, in > _find_and_load_unlocked > File "<frozen importlib._bootstrap>", line 648, in _load_unlocked > File "<frozen importlib._bootstrap>", line 560, in module_from_spec > File "<frozen importlib._bootstrap_external>", line 922, in > create_module > File "<frozen importlib._bootstrap>", line 205, in > _call_with_frames_removed > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 66: > invalid continuation byte > >> >>>> > ============================================================ > ==================== Looks like it may have started running code in the module as the first thing it does is imports the datetime and decimal modules. If you're able to add some printf() statements at key positions in the Module_Initialize() function in src/cx_Oracle.c that would be helpful. In particular, at the very beginning (to confirm that it is running), after the imports, after the PyModule_Create() call, just prior to the dpiContext_create() call, just after it, and just at the end. I wish I could replicate this myself! > > > 2) Try without the use of venv and make sure that cx_Oracle.pyd is outside >> of an "egg" -- in other words, as bare bones as possible; something in >> that >> setup could be conflicting and if so, we can narrow down the problem a bit >> bit further >> > > OK, we've tried without venv (so we have to run the installation as admin). > To get rid of the egg stuff we replaced the following code in setup.py: > > ============================================================ > ==================== > > try: > from setuptools import setup, Extension > except: > from distutils.core import setup > from distutils.extension import Extension > > ============================================================ > ==================== > > with: > > ============================================================ > ==================== > > from distutils.core import setup > from distutils.extension import Extension > > ============================================================ > ==================== > > Here is the compile/import output: > > ============================================================ > ==================== > > Microsoft Windows [Version 10.0.15063] > (c) 2017 Microsoft Corporation. Alle Rechte vorbehalten. > > C:\>cd C:\Program Files (x86)\Microsoft Visual > Studio\2017\Community\VC\Auxiliary\Build > > C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build>vcvarsall.bat > x86_amd64 > ********************************************************************** > ** Visual Studio 2017 Developer Command Prompt v15.0.26430.13 > ** Copyright (c) 2017 Microsoft Corporation > ********************************************************************** > [ERROR:typescript.bat] TypeScript was not added to PATH since a valid > installation was not found > [ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may > be incomplete and/or incorrect. *** > > C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build>cd > \ > > C:\>cd checkouts > > C:\checkouts>cd python-cx_Oracle > > C:\checkouts\python-cx_Oracle>\programme\python36\python setup.py build > running build > running build_ext > building 'cx_Oracle' extension > creating build > creating build\temp.win-amd64-3.6 > creating build\temp.win-amd64-3.6\Release > creating build\temp.win-amd64-3.6\Release\src > C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools > \MSVC\14.10.25017\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG > /MD -DDPI_DEBUG_LEVEL=7 -Iodpi/include -Iodpi/src > -IC:\programme\python36\include -IC:\programme\python36\include > "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools > \MSVC\14.10.25017\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft > Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include" > "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" > "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" > "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" > "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" > /Tcsrc/cx_Oracle.c /Fobuild\temp.win-amd64-3.6\Release\src/cx_Oracle.obj > -DBUILD_VERSION=6.0rc1 > cx_Oracle.c > c:\checkouts\python-cx_oracle\src\Connection.c(851): warning C4311: > "Typumwandlung": Zeigerverkürzung von "void *" zu "long" > creating C:\checkouts\python-cx_Oracle\build\lib.win-amd64-3.6 > C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools > \MSVC\14.10.25017\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG > /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\programme\python36\libs > /LIBPATH:C:\programme\python36\PCbuild\amd64 "/LIBPATH:C:\Program Files > (x86)\Microsoft Visual Studio\2017\Community\VC\Tools > \MSVC\14.10.25017\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files > (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\lib\x64" > "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\ucrt\x64" > "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\um\x64" > /EXPORT:PyInit_cx_Oracle build\temp.win-amd64-3.6\Release\src/cx_Oracle.obj > /OUT:build\lib.win-amd64-3.6\cx_Oracle.cp36-win_amd64.pyd > /IMPLIB:build\temp.win-amd64-3.6\Release\src\cx_Oracle.cp36-win_amd64.lib > cx_Oracle.obj : warning LNK4197: Export "PyInit_cx_Oracle" wurde mehrmals > angegeben; erste Angabe wird verwendet. > Bibliothek "build\temp.win-amd64-3.6\Release\src\cx_Oracle.cp36-win_amd64.lib" > und Objekt "build\temp.win-amd64-3.6\Release\src\cx_Oracle.cp36-win_amd64.exp" > werden erstellt. > Code wird generiert. > Codegenerierung ist abgeschlossen. > > C:\checkouts\python-cx_Oracle>\programme\python36\python setup.py install > running install > running build > running build_ext > running install_lib > copying build\lib.win-amd64-3.6\cx_Oracle.cp36-win_amd64.pyd -> > C:\programme\python36\Lib\site-packages > running install_data > copying LICENSE.txt -> C:\programme\python36\cx_Oracle-doc > copying README.txt -> C:\programme\python36\cx_Oracle-doc > copying samples\AdvancedQueuing.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\AppContext.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\DatabaseChangeNotification.py -> > C:\programme\python36\cx_Oracle-doc\samples > copying samples\DatabaseShutdown.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\DatabaseStartup.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\DMLReturningMultipleRows.py -> > C:\programme\python36\cx_Oracle-doc\samples > copying samples\DRCP.py -> C:\programme\python36\cx_Oracle-doc\samples > copying samples\Editioning.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\ImplicitResults.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\InsertGeometry.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\QueryChangeNotification.py -> > C:\programme\python36\cx_Oracle-doc\samples > copying samples\ReturnLongs.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\ReturnNumbersAsDecimals.py -> > C:\programme\python36\cx_Oracle-doc\samples > copying samples\ReturnUnicode.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\RowsAsInstance.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\ScrollableCursors.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\Threads.py -> C:\programme\python36\cx_Oracle-doc\samples > copying samples\TransactionGuard.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\TypeHandlers.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying samples\UniversalRowids.py -> C:\programme\python36\cx_Oracl > e-doc\samples > copying test\BooleanVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\Connection.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\Cursor.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\CursorVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\DateTimeVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\DMLReturning.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\DropTest.sql -> C:\programme\python36\cx_Oracle-doc\test > copying test\Error.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\Features12_1.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\IntervalVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\LobVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\LongVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\NCharVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\NumberVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\ObjectVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\SessionPool.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\SetupTest.sql -> C:\programme\python36\cx_Oracle-doc\test > copying test\StringVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\test.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\TestEnv.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\test_dbapi20.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\TimestampVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uConnection.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uCursor.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uCursorVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uDateTimeVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uFeatures12_1.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uIntervalVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uLobVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uLongVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uNumberVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uObjectVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uSessionPool.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uStringVar.py -> C:\programme\python36\cx_Oracle-doc\test > copying test\uTimestampVar.py -> C:\programme\python36\cx_Oracle-doc\test > running install_egg_info > Writing C:\programme\python36\Lib\site-packages\cx_Oracle-6.0rc1- > py3.6.egg-info > > C:\checkouts\python-cx_Oracle>\programme\python36\python -v > import _frozen_importlib # frozen > import _imp # builtin > import sys # builtin > import '_warnings' # <class '_frozen_importlib.BuiltinImporter'> > import '_thread' # <class '_frozen_importlib.BuiltinImporter'> > import '_weakref' # <class '_frozen_importlib.BuiltinImporter'> > import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImpor > ter'> > import '_io' # <class '_frozen_importlib.BuiltinImporter'> > import 'marshal' # <class '_frozen_importlib.BuiltinImporter'> > import 'nt' # <class '_frozen_importlib.BuiltinImporter'> > import _thread # previously loaded ('_thread') > import '_thread' # <class '_frozen_importlib.BuiltinImporter'> > import _weakref # previously loaded ('_weakref') > import '_weakref' # <class '_frozen_importlib.BuiltinImporter'> > import 'winreg' # <class '_frozen_importlib.BuiltinImporter'> > # installing zipimport hook > import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'> > # installed zipimport hook > # C:\programme\python36\lib\encodings\__pycache__\__init__.cpython-36.pyc > matches C:\programme\python36\lib\encodings\__init__.py > # code object from 'C:\\programme\\python36\\lib\ > \encodings\\__pycache__\\__init__.cpython-36.pyc' > # C:\programme\python36\lib\__pycache__\codecs.cpython-36.pyc matches > C:\programme\python36\lib\codecs.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\codecs.cpython-36.pyc' > import '_codecs' # <class '_frozen_importlib.BuiltinImporter'> > import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FAE8BA58> > # C:\programme\python36\lib\encodings\__pycache__\aliases.cpython-36.pyc > matches C:\programme\python36\lib\encodings\aliases.py > # code object from 'C:\\programme\\python36\\lib\ > \encodings\\__pycache__\\aliases.cpython-36.pyc' > import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FAEA46A0> > import 'encodings' # <_frozen_importlib_external.SourceFileLoader object > at 0x00000251FAE8B160> > # C:\programme\python36\lib\encodings\__pycache__\utf_8.cpython-36.pyc > matches C:\programme\python36\lib\encodings\utf_8.py > # code object from 'C:\\programme\\python36\\lib\ > \encodings\\__pycache__\\utf_8.cpython-36.pyc' > import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FAEB7710> > import '_signal' # <class '_frozen_importlib.BuiltinImporter'> > # C:\programme\python36\lib\encodings\__pycache__\latin_1.cpython-36.pyc > matches C:\programme\python36\lib\encodings\latin_1.py > # code object from 'C:\\programme\\python36\\lib\ > \encodings\\__pycache__\\latin_1.cpython-36.pyc' > import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FAEB7B70> > # C:\programme\python36\lib\__pycache__\io.cpython-36.pyc matches > C:\programme\python36\lib\io.py > # code object from 'C:\\programme\\python36\\lib\\__pycache__\\ > io.cpython-36.pyc' > # C:\programme\python36\lib\__pycache__\abc.cpython-36.pyc matches > C:\programme\python36\lib\abc.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\abc.cpython-36.pyc' > # C:\programme\python36\lib\__pycache__\_weakrefset.cpython-36.pyc > matches C:\programme\python36\lib\_weakrefset.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\_weakrefset.cpython-36.pyc' > import '_weakrefset' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FAEBCA58> > import 'abc' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FAEBC128> > import 'io' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FAEB7D30> > # C:\programme\python36\lib\__pycache__\site.cpython-36.pyc matches > C:\programme\python36\lib\site.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\site.cpython-36.pyc' > # C:\programme\python36\lib\__pycache__\os.cpython-36.pyc matches > C:\programme\python36\lib\os.py > # code object from 'C:\\programme\\python36\\lib\\__pycache__\\ > os.cpython-36.pyc' > import 'errno' # <class '_frozen_importlib.BuiltinImporter'> > # C:\programme\python36\lib\__pycache__\stat.cpython-36.pyc matches > C:\programme\python36\lib\stat.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\stat.cpython-36.pyc' > import '_stat' # <class '_frozen_importlib.BuiltinImporter'> > import 'stat' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FAEE76A0> > # C:\programme\python36\lib\__pycache__\ntpath.cpython-36.pyc matches > C:\programme\python36\lib\ntpath.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\ntpath.cpython-36.pyc' > # C:\programme\python36\lib\__pycache__\genericpath.cpython-36.pyc > matches C:\programme\python36\lib\genericpath.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\genericpath.cpython-36.pyc' > import 'genericpath' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FAEF15C0> > import 'ntpath' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FAEE7D30> > # C:\programme\python36\lib\__pycache__\_collections_abc.cpython-36.pyc > matches C:\programme\python36\lib\_collections_abc.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\_collections_abc.cpython-36.pyc' > import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FAEF1B70> > import 'os' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FAED4630> > # C:\programme\python36\lib\__pycache__\_sitebuiltins.cpython-36.pyc > matches C:\programme\python36\lib\_sitebuiltins.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\_sitebuiltins.cpython-36.pyc' > import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FAED4A20> > # C:\programme\python36\lib\__pycache__\sysconfig.cpython-36.pyc matches > C:\programme\python36\lib\sysconfig.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\sysconfig.cpython-36.pyc' > import 'sysconfig' # <_frozen_importlib_external.SourceFileLoader object > at 0x00000251FAED4EB8> > # C:\programme\python36\lib\__pycache__\_bootlocale.cpython-36.pyc > matches C:\programme\python36\lib\_bootlocale.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\_bootlocale.cpython-36.pyc' > import '_locale' # <class '_frozen_importlib.BuiltinImporter'> > import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FCCAA2B0> > # C:\programme\python36\lib\encodings\__pycache__\cp1252.cpython-36.pyc > matches C:\programme\python36\lib\encodings\cp1252.py > # code object from 'C:\\programme\\python36\\lib\ > \encodings\\__pycache__\\cp1252.cpython-36.pyc' > import 'encodings.cp1252' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FCCAA7B8> > import 'site' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FAECD2E8> > Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 > bit (AMD64)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > import 'atexit' # <class '_frozen_importlib.BuiltinImporter'> > >> import cx_Oracle >>>> >>> # C:\programme\python36\lib\__pycache__\datetime.cpython-36.pyc matches > C:\programme\python36\lib\datetime.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\datetime.cpython-36.pyc' > import 'time' # <class '_frozen_importlib.BuiltinImporter'> > import 'math' # <class '_frozen_importlib.BuiltinImporter'> > import '_datetime' # <class '_frozen_importlib.BuiltinImporter'> > import 'datetime' # <_frozen_importlib_external.SourceFileLoader object > at 0x00000251FCCB35F8> > # C:\programme\python36\lib\__pycache__\decimal.cpython-36.pyc matches > C:\programme\python36\lib\decimal.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\decimal.cpython-36.pyc' > # C:\programme\python36\lib\__pycache__\numbers.cpython-36.pyc matches > C:\programme\python36\lib\numbers.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\numbers.cpython-36.pyc' > import 'numbers' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FCDFC828> > # C:\programme\python36\lib\collections\__pycache__\__init__.cpython-36.pyc > matches C:\programme\python36\lib\collections\__init__.py > # code object from 'C:\\programme\\python36\\lib\ > \collections\\__pycache__\\__init__.cpython-36.pyc' > # C:\programme\python36\lib\__pycache__\operator.cpython-36.pyc matches > C:\programme\python36\lib\operator.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\operator.cpython-36.pyc' > import '_operator' # <class '_frozen_importlib.BuiltinImporter'> > import 'operator' # <_frozen_importlib_external.SourceFileLoader object > at 0x00000251FCE1BA90> > # C:\programme\python36\lib\__pycache__\keyword.cpython-36.pyc matches > C:\programme\python36\lib\keyword.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\keyword.cpython-36.pyc' > import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FCE34DA0> > # C:\programme\python36\lib\__pycache__\heapq.cpython-36.pyc matches > C:\programme\python36\lib\heapq.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\heapq.cpython-36.pyc' > import '_heapq' # <class '_frozen_importlib.BuiltinImporter'> > import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FCE3B5F8> > import 'itertools' # <class '_frozen_importlib.BuiltinImporter'> > # C:\programme\python36\lib\__pycache__\reprlib.cpython-36.pyc matches > C:\programme\python36\lib\reprlib.py > # code object from 'C:\\programme\\python36\\lib\ > \__pycache__\\reprlib.cpython-36.pyc' > import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FCE3BB70> > import '_collections' # <class '_frozen_importlib.BuiltinImporter'> > import 'collections' # <_frozen_importlib_external.SourceFileLoader > object at 0x00000251FCDEE1D0> > # extension module '_decimal' loaded from 'C:\\programme\\python36\\DLLs > \\_decimal.pyd' > # extension module '_decimal' executed from 'C:\\programme\\python36\\DLLs > \\_decimal.pyd' > import '_decimal' # <_frozen_importlib_external.ExtensionFileLoader > object at 0x00000251FCCB38D0> > import 'decimal' # <_frozen_importlib_external.SourceFileLoader object at > 0x00000251FCCB3780> > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "<frozen importlib._bootstrap>", line 961, in _find_and_load > File "<frozen importlib._bootstrap>", line 950, in > _find_and_load_unlocked > File "<frozen importlib._bootstrap>", line 648, in _load_unlocked > File "<frozen importlib._bootstrap>", line 560, in module_from_spec > File "<frozen importlib._bootstrap_external>", line 922, in > create_module > File "<frozen importlib._bootstrap>", line 205, in > _call_with_frames_removed > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 66: > invalid continuation byte > >> >>>> > ============================================================ > ==================== > > I also note that you are using VS 2017. Another person noted that >> uninstalling VS 2017 and using an earlier version worked for him -- why >> that would be is an interesting question (!!?) but if you have a machine >> that doesn't have VS 2017 but an earlier version that would be worth >> testing, too. >> > > We currently don't have a Windows 10 machine without VS 2017, but we're > going to > uninstall VS 2017 on this machine and retry with and an older version. > > Also, IIRC this exception means that the VS Redistributables are missing > or are > installed incorrectly. > > However I don't know how we can check this. You can use this tool: http://www.dependencywalker.com/ which will tell you what dependencies the cx_Oracle.pyd file and all of their dependencies, too. Hopefully it helps. > > > Regarding the dbapi20 tests, it would appear that this is not well >> supported by the community. Go ahead and log an issue. I'll do some more >> investigation. Fixing the code you noted above to work with Python 3 is >> easy enough -- but it won't help much if the dbapi20.py module isn't >> available! >> >> Anthony >> > > Servus, > Walter > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |