cx-oracle-users Mailing List for cx_Oracle (Page 5)
Brought to you by:
atuining
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Walter D. <wa...@li...> - 2017-07-05 16:19:32
|
On 5 Jul 2017, at 16:21, Anthony Tuininga wrote: >> [...] >> "%1 ist keine zulõssige Win32-Anwendung" (which should read "%1 ist >> keine >> zulässige Win32-Anwendung", i.e. the "ö" should be an "ä") means >> "%1 is not >> an acceptable win32 application". >> >> So we don't see the real problem because cx_Oracle fails to create >> the >> proper Unicode string from the OS error message. >> >> It's not clear what encoding this is (probable latin-1 or cp1252, but >> definitely *not* UTF-8). A >> >> grep 'xe4.*LATIN SMALL LETTER A WITH DIAERESIS' Lib/encodings/*.py >> >> in the Python source code returns 40 encodings that map the byte 0xE4 >> to ä. >> >> If the correct encoding can't be determined from the environment it >> might >> be best to use a less strict error handling (like e.g. >> backslashreplace) >> when decoding the bytes of the error message. >> > > Thanks, Walter. This is very helpful. We'll have to see what makes the > most > sense in this case. Do you see information in the event log regarding > this > error? Where can we find this event log? > [...] Servus, Walter |
From: Anthony T. <ant...@gm...> - 2017-07-05 14:21:12
|
On Wed, Jul 5, 2017 at 6:29 AM, Walter Dörwald <wa...@li...> wrote: > On 4 Jul 2017, at 16:35, Anthony Tuininga wrote: > > 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: >>> [...] >>> 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! >> > > We've found the spot where the error occurs with the following patch: > > ============================================================ > ==================== > > C:\checkouts\python-cx_Oracle\odpi>git diff > diff --git a/src/dpiOci.c b/src/dpiOci.c > index f881bed..e588b1c 100644 > --- a/src/dpiOci.c > +++ b/src/dpiOci.c > @@ -1338,6 +1338,7 @@ static int dpiOci__loadLib(dpiError *error) > #ifdef _WIN32 > DWORD length, errorNum; > #endif > + printf("Start dpiOci__loadLib()\n"); > > // dynamically load the OCI library > for (i = 0; !dpiOciLibHandle; i++) { > @@ -1356,6 +1357,7 @@ static int dpiOci__loadLib(dpiError *error) > if (length > 3) > loadError[length - 3] = '\0'; > else strcpy(loadError, "DLL load failed"); > + printf("loadError: %s\n",loadError); > } > #else > dpiOciLibHandle = dlopen(libName, RTLD_LAZY); > @@ -1370,6 +1372,7 @@ static int dpiOci__loadLib(dpiError *error) > return dpiError__set(error, "load library", DPI_ERR_LOAD_LIBRARY, > loadError); > > + printf("After LoadLibrary()\n"); > // validate library > if (dpiOci__loadLibValidate(error) < 0) { > #ifdef _WIN32 > > ============================================================ > ==================== > > With this patch, we get the following output: > > ============================================================ > ==================== > > import cx_Oracle >>>> >>> Start dpiOci__loadLib() > loadError: %1 ist keine zulõssige Win32-Anwendung > 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 > > ============================================================ > ==================== > > "%1 ist keine zulõssige Win32-Anwendung" (which should read "%1 ist keine > zulässige Win32-Anwendung", i.e. the "ö" should be an "ä") means "%1 is not > an acceptable win32 application". > > So we don't see the real problem because cx_Oracle fails to create the > proper Unicode string from the OS error message. > > It's not clear what encoding this is (probable latin-1 or cp1252, but > definitely *not* UTF-8). A > > grep 'xe4.*LATIN SMALL LETTER A WITH DIAERESIS' Lib/encodings/*.py > > in the Python source code returns 40 encodings that map the byte 0xE4 to ä. > > If the correct encoding can't be determined from the environment it might > be best to use a less strict error handling (like e.g. backslashreplace) > when decoding the bytes of the error message. > Thanks, Walter. This is very helpful. We'll have to see what makes the most sense in this case. Do you see information in the event log regarding this error? > > And of cause it would help if %1 was resolved to a useful filename. > Naturally. But that information isn't directly provided. I'll look into that, too. > > But now for the real error... > > [...] >> >>> >>> 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. >> > > OK, we tried that. The output is here: > > http://styx.livinglogic.de/~walter/cx_Oracle/cx_Oracle.cp36 > -win_amd64.txt > > dependencywalker seem that have many problems with this DLL, but what > sticks out is VCRUNTIME140.dll. This seems to be part of the "Visual C++ > Redistributable for Visual Studio 2015" which we downloaded from here: > > https://www.microsoft.com/en-us/download/details.aspx?id=48145 > > (we've downloaded vc_redist.x64.exe). When we install it, it complains > that another version is already installed. After we've uninstalled the 2017 > Redistributables installation works, but the output of "import cx_Oracle" > remains the same. > So the problem isn't resolved by the change of VS redistributable. Can you take a look in the event log? Can you also provide a list of all of the VS redistributables you have installed? I am going to try to replicate this myself. > > [...] >> > > 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 > |
From: Walter D. <wa...@li...> - 2017-07-05 12:29:37
|
On 4 Jul 2017, at 16:35, Anthony Tuininga wrote: > 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: >> [...] >> 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! We've found the spot where the error occurs with the following patch: ================================================================================ C:\checkouts\python-cx_Oracle\odpi>git diff diff --git a/src/dpiOci.c b/src/dpiOci.c index f881bed..e588b1c 100644 --- a/src/dpiOci.c +++ b/src/dpiOci.c @@ -1338,6 +1338,7 @@ static int dpiOci__loadLib(dpiError *error) #ifdef _WIN32 DWORD length, errorNum; #endif + printf("Start dpiOci__loadLib()\n"); // dynamically load the OCI library for (i = 0; !dpiOciLibHandle; i++) { @@ -1356,6 +1357,7 @@ static int dpiOci__loadLib(dpiError *error) if (length > 3) loadError[length - 3] = '\0'; else strcpy(loadError, "DLL load failed"); + printf("loadError: %s\n",loadError); } #else dpiOciLibHandle = dlopen(libName, RTLD_LAZY); @@ -1370,6 +1372,7 @@ static int dpiOci__loadLib(dpiError *error) return dpiError__set(error, "load library", DPI_ERR_LOAD_LIBRARY, loadError); + printf("After LoadLibrary()\n"); // validate library if (dpiOci__loadLibValidate(error) < 0) { #ifdef _WIN32 ================================================================================ With this patch, we get the following output: ================================================================================ >>> import cx_Oracle Start dpiOci__loadLib() loadError: %1 ist keine zulõssige Win32-Anwendung 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 ================================================================================ "%1 ist keine zulõssige Win32-Anwendung" (which should read "%1 ist keine zulässige Win32-Anwendung", i.e. the "ö" should be an "ä") means "%1 is not an acceptable win32 application". So we don't see the real problem because cx_Oracle fails to create the proper Unicode string from the OS error message. It's not clear what encoding this is (probable latin-1 or cp1252, but definitely *not* UTF-8). A grep 'xe4.*LATIN SMALL LETTER A WITH DIAERESIS' Lib/encodings/*.py in the Python source code returns 40 encodings that map the byte 0xE4 to ä. If the correct encoding can't be determined from the environment it might be best to use a less strict error handling (like e.g. backslashreplace) when decoding the bytes of the error message. And of cause it would help if %1 was resolved to a useful filename. But now for the real error... > [...] >> >> 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. OK, we tried that. The output is here: http://styx.livinglogic.de/~walter/cx_Oracle/cx_Oracle.cp36-win_amd64.txt dependencywalker seem that have many problems with this DLL, but what sticks out is VCRUNTIME140.dll. This seems to be part of the "Visual C++ Redistributable for Visual Studio 2015" which we downloaded from here: https://www.microsoft.com/en-us/download/details.aspx?id=48145 (we've downloaded vc_redist.x64.exe). When we install it, it complains that another version is already installed. After we've uninstalled the 2017 Redistributables installation works, but the output of "import cx_Oracle" remains the same. > [...] Servus, Walter |
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 > |
From: Walter D. <wa...@li...> - 2017-07-04 09:18:52
|
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 >>> ================================================================================ > 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_Oracle-doc\samples copying samples\AppContext.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\DatabaseChangeNotification.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\DatabaseShutdown.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\DatabaseStartup.py -> C:\programme\python36\cx_Oracle-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_Oracle-doc\samples copying samples\ImplicitResults.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\InsertGeometry.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\QueryChangeNotification.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\ReturnLongs.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\ReturnNumbersAsDecimals.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\ReturnUnicode.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\RowsAsInstance.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\ScrollableCursors.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\Threads.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\TransactionGuard.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\TypeHandlers.py -> C:\programme\python36\cx_Oracle-doc\samples copying samples\UniversalRowids.py -> C:\programme\python36\cx_Oracle-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.FrozenImporter'> 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. > 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 |
From: walter <wa...@li...> - 2017-07-03 19:03:20
|
On Mon, 3 Jul 2017 12:15:39 -0600, Anthony Tuininga <ant...@gm...> wrote: > On Mon, Jul 3, 2017 at 12:02 PM, walter wrote: > On Mon, 3 Jul 2017 07:59:24 -0600, Anthony Tuininga wrote: > > Hi Walter, > > [...] > > Regarding the dbapi20 tests, it would appear that this is not well > supported by the community. Go ahead and log an issue. > > Done: https://github.com/oracle/python-cx_Oracle/issues/44 [3] > > I would have done a pull request, but it seems this means signing a > contributors agreement. > > Thanks, Walter. Yes, a contributors agreement is required -- but only > one time. :-) OK. > Have you looked at the other suggestions I gave? Not yet. We'll try them tomorrow. > 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! Servus, Walter |
From: Anthony T. <ant...@gm...> - 2017-07-03 18:15:47
|
On Mon, Jul 3, 2017 at 12:02 PM, walter <wa...@li...> wrote: > On Mon, 3 Jul 2017 07:59:24 -0600, Anthony Tuininga < > ant...@gm...> wrote: > > Hi Walter, >> >> [...] >> >> Regarding the dbapi20 tests, it would appear that this is not well >> supported by the community. Go ahead and log an issue. >> > > Done: https://github.com/oracle/python-cx_Oracle/issues/44 > > I would have done a pull request, but it seems this means signing a > contributors agreement. Thanks, Walter. Yes, a contributors agreement is required -- but only one time. :-) Have you looked at the other suggestions I gave? > > > 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! >> > > 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 > |
From: walter <wa...@li...> - 2017-07-03 18:02:48
|
On Mon, 3 Jul 2017 07:59:24 -0600, Anthony Tuininga <ant...@gm...> wrote: > Hi Walter, > > [...] > > Regarding the dbapi20 tests, it would appear that this is not well > supported by the community. Go ahead and log an issue. Done: https://github.com/oracle/python-cx_Oracle/issues/44 I would have done a pull request, but it seems this means signing a contributors agreement. > 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! Servus, Walter |
From: Anthony T. <ant...@gm...> - 2017-07-03 13:59:35
|
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) 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 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. 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 On Mon, Jul 3, 2017 at 6:30 AM, Walter Dörwald <wa...@li...> wrote: > On 30 Jun 2017, at 13:55, Walter Dörwald wrote: > > On 29 Jun 2017, at 22:30, Anthony Tuininga wrote: >> >> Thanks, Chris. If anyone getting this issue is able to build cx_Oracle >>> themselves, please do so with the environment variable DPI_DEBUG_LEVEL >>> set >>> to the value 7 and report the results here or in a GitHub issue. Thanks! >>> >> >> [...] >> As you suggested, we will try compiling cx_Oracle from source next week. >> > > OK, we tried compiling cx_Oracle from source: > > ============================================================ > =============== > > 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\Auxil > iary\Build>cd\ > > C:\>cd \checkouts > > C:\checkouts>set > [...] > DPI_DEBUG_LEVEL=7 > [...] > Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools > \MSVC\14.10.25017\bin\HostX86\x64;C:\Program Files (x86)\Microsoft Visual > Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86;C:\Program > Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCPackages;C:\Program > Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files > (x86)\Microsoft Visual Studio\2017\Community\Common7\ > IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program > Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Roslyn;C:\Program > Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance > Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\;C:\Program > Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows > Kits\10\bin\10.0.15063.0\x86;C:\Program Files (x86)\Microsoft Visual > Studio\2017\Community\\MSBuild\15.0\bin;C:\WINDOWS\Microsoft > .NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual > Studio\2017\Community\Common7\IDE\;C:\Program Files (x86)\Microsoft > Visual Studio\2017\Community\Common7\Tools\;C:\pyvenvs\default\Scri > pts;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\ > Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\ > Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA > Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program > Files\Common Files\Intel\WirelessCommon\;C:\Program > Files\Git\cmd;C:\Program Files\OpenVPN\bin;C:\WINDOWS\s > ystem32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\ > System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows > Kits\10\Windows Performance Toolkit\;C:\Users\uli\AppData\ > Local\Microsoft\WindowsApps; > [...] > > C:\checkouts>\pyvenvs\default\scripts\activate > > (default) C:\checkouts>git clone https://github.com/oracle/pyth > on-cx_Oracle > Cloning into 'python-cx_Oracle'... > remote: Counting objects: 3345, done. > remote: Compressing objects: 100% (3/3), done. > remote: Total 3345 (delta 0), reused 1 (delta 0), pack-reused 3342 > Receiving objects: 100% (3345/3345), 4.56 MiB | 567.00 KiB/s, done. > Resolving deltas: 100% (2344/2344), done. > > (default) C:\checkouts>cd python-cx_Oracle > > (default) C:\checkouts\python-cx_Oracle>git clone > https://github.com/oracle/odpi > Cloning into 'odpi'... > remote: Counting objects: 1875, done. > remote: Compressing objects: 100% (172/172), done. > remote: Total 1875 (delta 85), reused 59 (delta 25), pack-reused 1678 > Receiving objects: 100% (1875/1875), 979.74 KiB | 524.00 KiB/s, done. > Resolving deltas: 100% (1363/1363), done. > > (default) C:\checkouts\python-cx_Oracle>python setup.py install > running install > running bdist_egg > running egg_info > writing cx_Oracle.egg-info\PKG-INFO > writing dependency_links to cx_Oracle.egg-info\dependency_links.txt > writing top-level names to cx_Oracle.egg-info\top_level.txt > reading manifest file 'cx_Oracle.egg-info\SOURCES.txt' > reading manifest template 'MANIFEST.in' > writing manifest file 'cx_Oracle.egg-info\SOURCES.txt' > installing library code to build\bdist.win-amd64\egg > running install_lib > running build_ext > building 'cx_Oracle' extension > 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:\pyvenvs\default\include -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:\pyvenvs\default\libs > /LIBPATH:c:\programme\python36\libs /LIBPATH:c:\programme\python36 > /LIBPATH:C:\pyvenvs\default\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. > creating build\bdist.win-amd64 > creating build\bdist.win-amd64\egg > copying build\lib.win-amd64-3.6\cx_Oracle.cp36-win_amd64.pyd -> > build\bdist.win-amd64\egg > creating stub loader for cx_Oracle.cp36-win_amd64.pyd > byte-compiling build\bdist.win-amd64\egg\cx_Oracle.py to > cx_Oracle.cpython-36.pyc > installing package data to build\bdist.win-amd64\egg > running install_data > creating build\bdist.win-amd64\egg\cx_Oracle-doc > copying LICENSE.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc > copying README.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc > creating build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\AdvancedQueuing.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\AppContext.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\DatabaseChangeNotification.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\DatabaseShutdown.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\DatabaseStartup.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\DMLReturningMultipleRows.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\DRCP.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\Editioning.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\ImplicitResults.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\InsertGeometry.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\QueryChangeNotification.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\ReturnLongs.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\ReturnNumbersAsDecimals.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\ReturnUnicode.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\RowsAsInstance.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\ScrollableCursors.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\Threads.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\TransactionGuard.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\TypeHandlers.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\UniversalRowids.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > creating build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\BooleanVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Connection.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Cursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\CursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\DateTimeVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\DMLReturning.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\DropTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Error.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Features12_1.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\IntervalVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\LobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\LongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\NCharVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\NumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\ObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\SessionPool.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\SetupTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\StringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\test.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\TestEnv.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\test_dbapi20.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\TimestampVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uConnection.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uCursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uCursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uDateTimeVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uFeatures12_1.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uIntervalVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uLobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uLongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uNumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uSessionPool.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uStringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uTimestampVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > creating build\bdist.win-amd64\egg\EGG-INFO > copying cx_Oracle.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO > copying cx_Oracle.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG- > INFO > copying cx_Oracle.egg-info\dependency_links.txt -> > build\bdist.win-amd64\egg\EGG-INFO > copying cx_Oracle.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG- > INFO > writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt > zip_safe flag not set; analyzing archive contents... > __pycache__.cx_Oracle.cpython-36: module references __file__ > creating 'dist\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' and adding > 'build\bdist.win-amd64\egg' to it > removing 'build\bdist.win-amd64\egg' (and everything under it) > Processing cx_Oracle-6.0rc1-py3.6-win-amd64.egg > removing 'c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' > (and everything under it) > creating c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6- > win-amd64.egg > Extracting cx_Oracle-6.0rc1-py3.6-win-amd64.egg to > c:\pyvenvs\default\lib\site-packages > Extracting cx_Oracle-6.0rc1-py3.6-win-amd64.egg to > c:\pyvenvs\default\lib\site-packages > File "c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6 > -win-amd64.egg\cx_Oracle-doc\test\test_dbapi20.py", line 46 > print "Testing cx_Oracle version", cx_Oracle.version > ^ > SyntaxError: Missing parentheses in call to 'print' > > File "c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6 > -win-amd64.egg\cx_Oracle-doc\test\uFeatures12_1.py", line 42 > [1L, 1L, 1L, 1L, 1L]) > ^ > SyntaxError: invalid syntax > > File "c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6 > -win-amd64.egg\cx_Oracle-doc\test\uNumberVar.py", line 26 > nullableCol = 143L ** i > ^ > SyntaxError: invalid syntax > > Adding cx-Oracle 6.0rc1 to easy-install.pth file > > Installed c:\pyvenvs\default\lib\site-packages\cx_oracle-6.0rc1-py3.6- > win-amd64.egg > Processing dependencies for cx-Oracle==6.0rc1 > Finished processing dependencies for cx-Oracle==6.0rc1 > > ============================================================ > =============== > > It seems that this part of the code is not Python 3 compatible. > > Should I open a Github issue for those errors? > > After fixing those errors "python setup.py install" runs to completion, > however importing cx_Oracle still fails with the same error message: > > ============================================================ > =============== > > (default) C:\checkouts\python-cx_Oracle>python setup.py install > running install > running bdist_egg > running egg_info > writing cx_Oracle.egg-info\PKG-INFO > writing dependency_links to cx_Oracle.egg-info\dependency_links.txt > writing top-level names to cx_Oracle.egg-info\top_level.txt > reading manifest file 'cx_Oracle.egg-info\SOURCES.txt' > reading manifest template 'MANIFEST.in' > writing manifest file 'cx_Oracle.egg-info\SOURCES.txt' > installing library code to build\bdist.win-amd64\egg > running install_lib > running build_ext > building 'cx_Oracle' extension > 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:\pyvenvs\default\include -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:\pyvenvs\default\libs > /LIBPATH:c:\programme\python36\libs /LIBPATH:c:\programme\python36 > /LIBPATH:C:\pyvenvs\default\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. > creating build\bdist.win-amd64 > creating build\bdist.win-amd64\egg > copying build\lib.win-amd64-3.6\cx_Oracle.cp36-win_amd64.pyd -> > build\bdist.win-amd64\egg > creating stub loader for cx_Oracle.cp36-win_amd64.pyd > byte-compiling build\bdist.win-amd64\egg\cx_Oracle.py to > cx_Oracle.cpython-36.pyc > installing package data to build\bdist.win-amd64\egg > running install_data > creating build\bdist.win-amd64\egg\cx_Oracle-doc > copying LICENSE.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc > copying README.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc > creating build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\AdvancedQueuing.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\AppContext.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\DatabaseChangeNotification.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\DatabaseShutdown.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\DatabaseStartup.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\DMLReturningMultipleRows.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\DRCP.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\Editioning.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\ImplicitResults.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\InsertGeometry.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\QueryChangeNotification.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\ReturnLongs.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\ReturnNumbersAsDecimals.py -> > build\bdist.win-amd64\egg\cx_Oracle-doc\samples > copying samples\ReturnUnicode.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\RowsAsInstance.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\ScrollableCursors.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\Threads.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\TransactionGuard.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\TypeHandlers.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > copying samples\UniversalRowids.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\samples > creating build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\BooleanVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Connection.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Cursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\CursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\DateTimeVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\DMLReturning.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\DropTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Error.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\Features12_1.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\IntervalVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\LobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\LongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\NCharVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\NumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\ObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\SessionPool.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\SetupTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\StringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\test.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\TestEnv.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\test_dbapi20.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\TimestampVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uConnection.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uCursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uCursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uDateTimeVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uFeatures12_1.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uIntervalVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uLobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uLongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uNumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uSessionPool.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > copying test\uStringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test > copying test\uTimestampVar.py -> build\bdist.win-amd64\egg\cx_O > racle-doc\test > creating build\bdist.win-amd64\egg\EGG-INFO > copying cx_Oracle.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO > copying cx_Oracle.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG- > INFO > copying cx_Oracle.egg-info\dependency_links.txt -> > build\bdist.win-amd64\egg\EGG-INFO > copying cx_Oracle.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG- > INFO > writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt > zip_safe flag not set; analyzing archive contents... > __pycache__.cx_Oracle.cpython-36: module references __file__ > creating 'dist\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' and adding > 'build\bdist.win-amd64\egg' to it > removing 'build\bdist.win-amd64\egg' (and everything under it) > Processing cx_Oracle-6.0rc1-py3.6-win-amd64.egg > removing 'c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' > (and everything under it) > creating c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6- > win-amd64.egg > Extracting cx_Oracle-6.0rc1-py3.6-win-amd64.egg to > c:\pyvenvs\default\lib\site-packages > cx-Oracle 6.0rc1 is already the active version in easy-install.pth > > Installed c:\pyvenvs\default\lib\site-packages\cx_oracle-6.0rc1-py3.6- > win-amd64.egg > Processing dependencies for cx-Oracle==6.0rc1 > Finished processing dependencies for cx-Oracle==6.0rc1 > > (default) C:\checkouts\python-cx_Oracle>python > 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 cx_Oracle >>>> >>> Traceback (most recent call last): > File "<stdin>", line 1, in <module> > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 66: > invalid continuation byte > >> >>>> > ============================================================ > =============== > > BTW, what does the DPI_DEBUG_LEVEL environment variable do? It seem the > above code doesn't produce any additional output. > > 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 > |
From: Walter D. <wa...@li...> - 2017-07-03 12:30:59
|
On 30 Jun 2017, at 13:55, Walter Dörwald wrote: > On 29 Jun 2017, at 22:30, Anthony Tuininga wrote: > >> Thanks, Chris. If anyone getting this issue is able to build >> cx_Oracle >> themselves, please do so with the environment variable >> DPI_DEBUG_LEVEL set >> to the value 7 and report the results here or in a GitHub issue. >> Thanks! > > [...] > As you suggested, we will try compiling cx_Oracle from source next > week. OK, we tried compiling cx_Oracle from source: =========================================================================== 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>set [...] DPI_DEBUG_LEVEL=7 [...] Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\\MSBuild\15.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\;C:\pyvenvs\default\Scripts;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files\OpenVPN\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\uli\AppData\Local\Microsoft\WindowsApps; [...] C:\checkouts>\pyvenvs\default\scripts\activate (default) C:\checkouts>git clone https://github.com/oracle/python-cx_Oracle Cloning into 'python-cx_Oracle'... remote: Counting objects: 3345, done. remote: Compressing objects: 100% (3/3), done. remote: Total 3345 (delta 0), reused 1 (delta 0), pack-reused 3342 Receiving objects: 100% (3345/3345), 4.56 MiB | 567.00 KiB/s, done. Resolving deltas: 100% (2344/2344), done. (default) C:\checkouts>cd python-cx_Oracle (default) C:\checkouts\python-cx_Oracle>git clone https://github.com/oracle/odpi Cloning into 'odpi'... remote: Counting objects: 1875, done. remote: Compressing objects: 100% (172/172), done. remote: Total 1875 (delta 85), reused 59 (delta 25), pack-reused 1678 Receiving objects: 100% (1875/1875), 979.74 KiB | 524.00 KiB/s, done. Resolving deltas: 100% (1363/1363), done. (default) C:\checkouts\python-cx_Oracle>python setup.py install running install running bdist_egg running egg_info writing cx_Oracle.egg-info\PKG-INFO writing dependency_links to cx_Oracle.egg-info\dependency_links.txt writing top-level names to cx_Oracle.egg-info\top_level.txt reading manifest file 'cx_Oracle.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'cx_Oracle.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_ext building 'cx_Oracle' extension 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:\pyvenvs\default\include -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:\pyvenvs\default\libs /LIBPATH:c:\programme\python36\libs /LIBPATH:c:\programme\python36 /LIBPATH:C:\pyvenvs\default\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. creating build\bdist.win-amd64 creating build\bdist.win-amd64\egg copying build\lib.win-amd64-3.6\cx_Oracle.cp36-win_amd64.pyd -> build\bdist.win-amd64\egg creating stub loader for cx_Oracle.cp36-win_amd64.pyd byte-compiling build\bdist.win-amd64\egg\cx_Oracle.py to cx_Oracle.cpython-36.pyc installing package data to build\bdist.win-amd64\egg running install_data creating build\bdist.win-amd64\egg\cx_Oracle-doc copying LICENSE.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc copying README.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc creating build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\AdvancedQueuing.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\AppContext.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DatabaseChangeNotification.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DatabaseShutdown.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DatabaseStartup.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DMLReturningMultipleRows.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DRCP.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\Editioning.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ImplicitResults.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\InsertGeometry.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\QueryChangeNotification.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ReturnLongs.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ReturnNumbersAsDecimals.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ReturnUnicode.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\RowsAsInstance.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ScrollableCursors.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\Threads.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\TransactionGuard.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\TypeHandlers.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\UniversalRowids.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples creating build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\BooleanVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Connection.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Cursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\CursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\DateTimeVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\DMLReturning.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\DropTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Error.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Features12_1.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\IntervalVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\LobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\LongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\NCharVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\NumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\ObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\SessionPool.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\SetupTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\StringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\test.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\TestEnv.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\test_dbapi20.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\TimestampVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uConnection.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uCursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uCursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uDateTimeVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uFeatures12_1.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uIntervalVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uLobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uLongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uNumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uSessionPool.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uStringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uTimestampVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test creating build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt zip_safe flag not set; analyzing archive contents... __pycache__.cx_Oracle.cpython-36: module references __file__ creating 'dist\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' and adding 'build\bdist.win-amd64\egg' to it removing 'build\bdist.win-amd64\egg' (and everything under it) Processing cx_Oracle-6.0rc1-py3.6-win-amd64.egg removing 'c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' (and everything under it) creating c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg Extracting cx_Oracle-6.0rc1-py3.6-win-amd64.egg to c:\pyvenvs\default\lib\site-packages Extracting cx_Oracle-6.0rc1-py3.6-win-amd64.egg to c:\pyvenvs\default\lib\site-packages File "c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg\cx_Oracle-doc\test\test_dbapi20.py", line 46 print "Testing cx_Oracle version", cx_Oracle.version ^ SyntaxError: Missing parentheses in call to 'print' File "c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg\cx_Oracle-doc\test\uFeatures12_1.py", line 42 [1L, 1L, 1L, 1L, 1L]) ^ SyntaxError: invalid syntax File "c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg\cx_Oracle-doc\test\uNumberVar.py", line 26 nullableCol = 143L ** i ^ SyntaxError: invalid syntax Adding cx-Oracle 6.0rc1 to easy-install.pth file Installed c:\pyvenvs\default\lib\site-packages\cx_oracle-6.0rc1-py3.6-win-amd64.egg Processing dependencies for cx-Oracle==6.0rc1 Finished processing dependencies for cx-Oracle==6.0rc1 =========================================================================== It seems that this part of the code is not Python 3 compatible. Should I open a Github issue for those errors? After fixing those errors "python setup.py install" runs to completion, however importing cx_Oracle still fails with the same error message: =========================================================================== (default) C:\checkouts\python-cx_Oracle>python setup.py install running install running bdist_egg running egg_info writing cx_Oracle.egg-info\PKG-INFO writing dependency_links to cx_Oracle.egg-info\dependency_links.txt writing top-level names to cx_Oracle.egg-info\top_level.txt reading manifest file 'cx_Oracle.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'cx_Oracle.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_ext building 'cx_Oracle' extension 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:\pyvenvs\default\include -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:\pyvenvs\default\libs /LIBPATH:c:\programme\python36\libs /LIBPATH:c:\programme\python36 /LIBPATH:C:\pyvenvs\default\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. creating build\bdist.win-amd64 creating build\bdist.win-amd64\egg copying build\lib.win-amd64-3.6\cx_Oracle.cp36-win_amd64.pyd -> build\bdist.win-amd64\egg creating stub loader for cx_Oracle.cp36-win_amd64.pyd byte-compiling build\bdist.win-amd64\egg\cx_Oracle.py to cx_Oracle.cpython-36.pyc installing package data to build\bdist.win-amd64\egg running install_data creating build\bdist.win-amd64\egg\cx_Oracle-doc copying LICENSE.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc copying README.txt -> build\bdist.win-amd64\egg\cx_Oracle-doc creating build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\AdvancedQueuing.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\AppContext.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DatabaseChangeNotification.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DatabaseShutdown.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DatabaseStartup.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DMLReturningMultipleRows.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\DRCP.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\Editioning.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ImplicitResults.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\InsertGeometry.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\QueryChangeNotification.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ReturnLongs.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ReturnNumbersAsDecimals.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ReturnUnicode.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\RowsAsInstance.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\ScrollableCursors.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\Threads.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\TransactionGuard.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\TypeHandlers.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples copying samples\UniversalRowids.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\samples creating build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\BooleanVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Connection.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Cursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\CursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\DateTimeVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\DMLReturning.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\DropTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Error.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\Features12_1.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\IntervalVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\LobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\LongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\NCharVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\NumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\ObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\SessionPool.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\SetupTest.sql -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\StringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\test.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\TestEnv.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\test_dbapi20.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\TimestampVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uConnection.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uCursor.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uCursorVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uDateTimeVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uFeatures12_1.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uIntervalVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uLobVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uLongVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uNumberVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uObjectVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uSessionPool.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uStringVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test copying test\uTimestampVar.py -> build\bdist.win-amd64\egg\cx_Oracle-doc\test creating build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO copying cx_Oracle.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt zip_safe flag not set; analyzing archive contents... __pycache__.cx_Oracle.cpython-36: module references __file__ creating 'dist\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' and adding 'build\bdist.win-amd64\egg' to it removing 'build\bdist.win-amd64\egg' (and everything under it) Processing cx_Oracle-6.0rc1-py3.6-win-amd64.egg removing 'c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg' (and everything under it) creating c:\pyvenvs\default\lib\site-packages\cx_Oracle-6.0rc1-py3.6-win-amd64.egg Extracting cx_Oracle-6.0rc1-py3.6-win-amd64.egg to c:\pyvenvs\default\lib\site-packages cx-Oracle 6.0rc1 is already the active version in easy-install.pth Installed c:\pyvenvs\default\lib\site-packages\cx_oracle-6.0rc1-py3.6-win-amd64.egg Processing dependencies for cx-Oracle==6.0rc1 Finished processing dependencies for cx-Oracle==6.0rc1 (default) C:\checkouts\python-cx_Oracle>python 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 cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 66: invalid continuation byte >>> =========================================================================== BTW, what does the DPI_DEBUG_LEVEL environment variable do? It seem the above code doesn't produce any additional output. Servus, Walter |
From: Walter D. <wa...@li...> - 2017-06-30 11:55:30
|
On 29 Jun 2017, at 22:30, Anthony Tuininga wrote: > Thanks, Chris. If anyone getting this issue is able to build cx_Oracle > themselves, please do so with the environment variable DPI_DEBUG_LEVEL > set > to the value 7 and report the results here or in a GitHub issue. > Thanks! We have an Oracle 11 XE installation, so the VS Redistributables we need should be from VS 2005. dumpbin confirms this: C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\VC\bin\amd64_x86>dumpbin /dependents C:\oraclexe\app\oracle\product\11.2.0\server\bin\oci.dll Microsoft (R) COFF/PE Dumper Version 14.00.24218.2 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file C:\oraclexe\app\oracle\product\11.2.0\server\bin\oci.dll File Type: DLL Image has the following dependencies: KERNEL32.dll MSVCR80.dll ADVAPI32.dll PSAPI.DLL Summary 4000 .data 1F000 .rdata 17000 .reloc 1000 .rsrc BF000 .text According to https://github.com/oracle/node-oracledb/blob/dev-2.0/INSTALL.md#75-install-the-visual-studio-redistributable MSVCR80.dll mean VS 2005. However after downloading vcredist_x64.exe from https://www.microsoft.com/en-us/download/details.aspx?id=18471 the situation remains unchanged. Note that this page states: Supported Operating System Windows 2000, Windows 7, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP Could this be the problem (as we're on Windows 10 Home)? As you suggested, we will try compiling cx_Oracle from source next week. Servus, Walter > Anthony > > On Thu, Jun 29, 2017 at 6:54 AM, Christopher Jones < > chr...@or...> wrote: > >> Do you have the right VS Redistributable? With Oracle 11.2 client >> libraries you need the VS 2005 Redistributable. >> >> Related info is in https://github.com/oracle/node >> -oracledb/blob/dev-2.0/INSTALL.md#75-install-the-visual- >> studio-redistributable >> and https://github.com/oracle/python-cx_Oracle/issues/43 >> >> Chris >> >> >> On 29/6/17 8:39 pm, Walter Dörwald wrote: >> >>> Hello all! >>> >>> We're trying to use the new cx_Oracle 6.0 on Windows and have the >>> following problem: >>> >>> (default) C:\>pip install --no-cache-dir cx_Oracle==6.0rc1 >>> Collecting cx_Oracle==6.0rc1 >>> Downloading cx_Oracle-6.0rc1-cp36-cp36m-win_amd64.whl (210kB) >>> 100% >>> |████████████████████████████████| >>> 215kB 2.7MB/s >>> Installing collected packages: cx-Oracle >>> Successfully installed cx-Oracle-6.0rc1 >>> >>> (default) C:\>python >>> 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 cx_Oracle >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in >>> position >>> 66: invalid continuation byte >>> >>> >>> >>> This is on Windows 10 Home. The Python version is the one that you >>> get >>> when you install Visual Studio 2017 with the Python development >>> workload. >>> The Oracle version is an Oracle 11 XE. ORACLE_HOME points to >>> c:\oraclexe\app\oracle\product\11.2.0\server >>> >>> The Oracle installation itself seems to be working: >>> >>> (default) C:\>sqlplus >>> >>> SQL*Plus: Release 11.2.0.2.0 Production on Do Jun 29 11:49:53 >>> 2017 >>> >>> Copyright (c) 1982, 2010, Oracle. All rights reserved. >>> >>> Enter user-name: sys/pwd as sysdba >>> >>> Connected to: >>> Oracle Database 11g Express Edition Release 11.2.0.2.0 - >>> Production >>> >>> SQL> exit >>> Disconnected from Oracle Database 11g Express Edition Release >>> 11.2.0.2.0 - Production >>> >>> This seems to be a problem related to encoding, but changing >>> NLS_LANG >>> from GERMAN_GERMANY.AL32UTF8 to GERMAN_GERMANY.WE8IOS8859P1 doesn't >>> change >>> anything. >>> >>> Any help with getting cx_Oracle running would be appreciated. >>> >>> Servus, >>> Walter >>> >>> -- >> http://twitter.com/ghrd >> |
From: Anthony T. <ant...@gm...> - 2017-06-29 20:30:50
|
Thanks, Chris. If anyone getting this issue is able to build cx_Oracle themselves, please do so with the environment variable DPI_DEBUG_LEVEL set to the value 7 and report the results here or in a GitHub issue. Thanks! Anthony On Thu, Jun 29, 2017 at 6:54 AM, Christopher Jones < chr...@or...> wrote: > Do you have the right VS Redistributable? With Oracle 11.2 client > libraries you need the VS 2005 Redistributable. > > Related info is in https://github.com/oracle/node > -oracledb/blob/dev-2.0/INSTALL.md#75-install-the-visual- > studio-redistributable > and https://github.com/oracle/python-cx_Oracle/issues/43 > > Chris > > > On 29/6/17 8:39 pm, Walter Dörwald wrote: > >> Hello all! >> >> We're trying to use the new cx_Oracle 6.0 on Windows and have the >> following problem: >> >> (default) C:\>pip install --no-cache-dir cx_Oracle==6.0rc1 >> Collecting cx_Oracle==6.0rc1 >> Downloading cx_Oracle-6.0rc1-cp36-cp36m-win_amd64.whl (210kB) >> 100% |████████████████████████████████| 215kB 2.7MB/s >> Installing collected packages: cx-Oracle >> Successfully installed cx-Oracle-6.0rc1 >> >> (default) C:\>python >> 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 cx_Oracle >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position >> 66: invalid continuation byte >> >>> >> >> This is on Windows 10 Home. The Python version is the one that you get >> when you install Visual Studio 2017 with the Python development workload. >> The Oracle version is an Oracle 11 XE. ORACLE_HOME points to >> c:\oraclexe\app\oracle\product\11.2.0\server >> >> The Oracle installation itself seems to be working: >> >> (default) C:\>sqlplus >> >> SQL*Plus: Release 11.2.0.2.0 Production on Do Jun 29 11:49:53 2017 >> >> Copyright (c) 1982, 2010, Oracle. All rights reserved. >> >> Enter user-name: sys/pwd as sysdba >> >> Connected to: >> Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production >> >> SQL> exit >> Disconnected from Oracle Database 11g Express Edition Release >> 11.2.0.2.0 - Production >> >> This seems to be a problem related to encoding, but changing NLS_LANG >> from GERMAN_GERMANY.AL32UTF8 to GERMAN_GERMANY.WE8IOS8859P1 doesn't change >> anything. >> >> Any help with getting cx_Oracle running would be appreciated. >> >> Servus, >> Walter >> >> -- > http://twitter.com/ghrd > > > ------------------------------------------------------------ > ------------------ > 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 > |
From: Christopher J. <chr...@or...> - 2017-06-29 12:54:49
|
Do you have the right VS Redistributable? With Oracle 11.2 client libraries you need the VS 2005 Redistributable. Related info is in https://github.com/oracle/node-oracledb/blob/dev-2.0/INSTALL.md#75-install-the-visual-studio-redistributable and https://github.com/oracle/python-cx_Oracle/issues/43 Chris On 29/6/17 8:39 pm, Walter Dörwald wrote: > Hello all! > > We're trying to use the new cx_Oracle 6.0 on Windows and have the following problem: > > (default) C:\>pip install --no-cache-dir cx_Oracle==6.0rc1 > Collecting cx_Oracle==6.0rc1 > Downloading cx_Oracle-6.0rc1-cp36-cp36m-win_amd64.whl (210kB) > 100% |████████████████████████████████| 215kB 2.7MB/s > Installing collected packages: cx-Oracle > Successfully installed cx-Oracle-6.0rc1 > > (default) C:\>python > 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 cx_Oracle > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 66: invalid continuation byte > >>> > > This is on Windows 10 Home. The Python version is the one that you get when you install Visual Studio 2017 with the Python development workload. The > Oracle version is an Oracle 11 XE. ORACLE_HOME points to c:\oraclexe\app\oracle\product\11.2.0\server > > The Oracle installation itself seems to be working: > > (default) C:\>sqlplus > > SQL*Plus: Release 11.2.0.2.0 Production on Do Jun 29 11:49:53 2017 > > Copyright (c) 1982, 2010, Oracle. All rights reserved. > > Enter user-name: sys/pwd as sysdba > > Connected to: > Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production > > SQL> exit > Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production > > This seems to be a problem related to encoding, but changing NLS_LANG from GERMAN_GERMANY.AL32UTF8 to GERMAN_GERMANY.WE8IOS8859P1 doesn't change > anything. > > Any help with getting cx_Oracle running would be appreciated. > > Servus, > Walter > -- http://twitter.com/ghrd |
From: Walter D. <wa...@li...> - 2017-06-29 11:07:05
|
Hello all! We're trying to use the new cx_Oracle 6.0 on Windows and have the following problem: (default) C:\>pip install --no-cache-dir cx_Oracle==6.0rc1 Collecting cx_Oracle==6.0rc1 Downloading cx_Oracle-6.0rc1-cp36-cp36m-win_amd64.whl (210kB) 100% |████████████████████████████████| 215kB 2.7MB/s Installing collected packages: cx-Oracle Successfully installed cx-Oracle-6.0rc1 (default) C:\>python 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 cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 66: invalid continuation byte >>> This is on Windows 10 Home. The Python version is the one that you get when you install Visual Studio 2017 with the Python development workload. The Oracle version is an Oracle 11 XE. ORACLE_HOME points to c:\oraclexe\app\oracle\product\11.2.0\server The Oracle installation itself seems to be working: (default) C:\>sqlplus SQL*Plus: Release 11.2.0.2.0 Production on Do Jun 29 11:49:53 2017 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter user-name: sys/pwd as sysdba Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production SQL> exit Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production This seems to be a problem related to encoding, but changing NLS_LANG from GERMAN_GERMANY.AL32UTF8 to GERMAN_GERMANY.WE8IOS8859P1 doesn't change anything. Any help with getting cx_Oracle running would be appreciated. Servus, Walter |
From: Venky <ven...@gm...> - 2017-06-21 16:35:46
|
Thanks Anthony, Chris for the solution. On Wed, Jun 21, 2017 at 10:03 PM, Venky <ven...@gm...> wrote: > Hi Jakob, > > Tried but getting as invalid keyword. > > >>> import cx_Oracle > > >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby', > sysdba=True) > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > TypeError: 'sysdba' is an invalid keyword argument for this function > > > > Then tried as shown below with mode = cx_Oracle.SYSDBA and it worked. > > Thanks Jakob for giving the pointer. > > db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby', > mode = cx_Oracle.SYSDBA) > > >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby', > mode = cx_Oracle.SYSDBA) > > >>> cursor = db.cursor() > > >>> cursor.execute('select sequence# from v$archived_log order by rownum > desc') > > <cx_Oracle.Cursor on <cx_Oracle.Connection to sys@67.220.186.115:15210/ > standby>> > > > > ~ Venky > > On Wed, Jun 21, 2017 at 1:54 PM, Jakob Gurnhofer <ja...@gu...> wrote: > >> Hi Venky, >> >> >> have you tried connecting "as sysdba"? >> >> like: >> >> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' >> <http://67.220.186.115:15210/standby%27>, *sysdba=True*) >> >> Jakob >> >> >> >> Am 21.06.2017 um 09:36 schrieb Venky: >> >> Hi Folks, >> >> I need your help wrt below issue faced while connecting to SQL*Plus: >> Release 12.1.0.2.0 Production on Wed Jun 21 06:50:43 2017 >> using the below cx_Oracle python module. >> >> pip show cx_Oracle >> >> Name: cx-Oracle >> >> Version: 5.3 >> >> Summary: Python interface to Oracle >> >> Home-page: https://oracle.github.io/python-cx_Oracle >> >> Author: Anthony Tuininga >> >> Author-email: ant...@gm... >> >> License: BSD License >> >> Location: /usr/lib64/python2.7/site-packages >> >> Requires: >> >> Below are the oracle instant client files used. >> >> 1. oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm >> 2. oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm >> 3. oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm >> >> >> >>> import cx_Oracle >> >> >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/ >> standby' <http://67.220.186.115:15210/standby%27>); >> >> Traceback (most recent call last): >> >> File "<stdin>", line 1, in <module> >> >> cx_Oracle.OperationalError: ORA-01033: ORACLE initialization or shutdown >> in progress >> >> Process ID: 0 >> >> Session ID: 0 Serial number: 0 >> >> >> >> - Master Oracle 12c is on the host 67.220.182.210 at port 1521 >> - Below is the Oracle 12c instance running on host 67.220.186.115 at >> port 15210 >> - This instance will always be in mounted mode since this instance is >> the result of the replication from master. >> - I can connect to it using below manual steps but can't using >> cx_Oracle as shown above. >> >> >> ps -aef| grep pmon >> >> oracle 106 1 0 06:47 ? 00:00:00 ora_pmon_standby >> >> root 334 231 0 07:34 ? 00:00:00 grep --color=auto pmon >> >> >> >> cat $ORACLE_HOME/network/admin/listener.ora >> >> LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)( >> HOST=0.0.0.0)(PORT=1521)))) >> >> SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(GLOBAL_DBNAME=standby >> )(ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1)(SID_ >> NAME=standby))) >> >> >> >> cat $ORACLE_HOME/network/admin/tnsnames.ora >> >> TESTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HO >> ST=67.220.182.210)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTDB))) >> >> standby=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(H >> OST=0.0.0.0)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=standby))) >> >> >> >> lsnrctl status >> >> >> LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 21-JUN-2017 07:28:49 >> >> >> Copyright (c) 1991, 2014, Oracle. All rights reserved. >> >> >> Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT= >> 1521))) >> >> STATUS of the LISTENER >> >> ------------------------ >> >> Alias LISTENER >> >> Version TNSLSNR for Linux: Version 12.1.0.2.0 - >> Production >> >> Start Date 21-JUN-2017 06:47:09 >> >> Uptime 0 days 0 hr. 41 min. 40 sec >> >> Trace Level off >> >> Security ON: Local OS Authentication >> >> SNMP OFF >> >> Listener Parameter File /u01/app/oracle/product/12.1.0 >> /dbhome_1/network/admin/listener.ora >> >> Listener Log File /u01/app/oracle/diag/tnslsnr/o >> racle-ldt1/listener/alert/log.xml >> >> Listening Endpoints Summary... >> >> (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) >> >> Services Summary... >> >> Service "standby" has 2 instance(s). >> >> Instance "standby", status UNKNOWN, has 1 handler(s) for this service... >> >> Instance "standby", status READY, has 1 handler(s) for this service... >> >> The command completed successfully >> >> >> >> $export ORACLE_SID=standby; sqlplus sys/apporbit as sysdba >> >> >> SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 07:26:55 2017 >> >> >> Copyright (c) 1982, 2014, Oracle. All rights reserved. >> >> >> >> Connected to: >> >> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit >> Production >> >> With the Partitioning, OLAP, Advanced Analytics and Real Application >> Testing options >> >> >> SQL> select status, database_status from v$instance; >> >> >> STATUS DATABASE_STATUS >> >> ------------ ----------------- >> >> MOUNTED ACTIVE >> >> >> SQL> select open_mode, database_role from v$database; >> >> >> OPEN_MODE DATABASE_ROLE >> >> -------------------- ---------------- >> >> MOUNTED PHYSICAL STANDBY >> >> >> >> ~Venky >> >> >> ------------------------------------------------------------------------------ >> 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 lis...@li...https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> -- >> Ing. Jakob Gurnhofer, BSc...@gu...https://gurn.at >> >> >> ------------------------------------------------------------ >> ------------------ >> 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 >> >> > > -- Hi ~Venky |
From: Venky <ven...@gm...> - 2017-06-21 16:34:05
|
Hi Jakob, Tried but getting as invalid keyword. >>> import cx_Oracle >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby', sysdba=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'sysdba' is an invalid keyword argument for this function Then tried as shown below with mode = cx_Oracle.SYSDBA and it worked. Thanks Jakob for giving the pointer. db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby', mode = cx_Oracle.SYSDBA) >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby', mode = cx_Oracle.SYSDBA) >>> cursor = db.cursor() >>> cursor.execute('select sequence# from v$archived_log order by rownum desc') <cx_Oracle.Cursor on <cx_Oracle.Connection to sys@67.220.186.115:15210/standby>> ~ Venky On Wed, Jun 21, 2017 at 1:54 PM, Jakob Gurnhofer <ja...@gu...> wrote: > Hi Venky, > > > have you tried connecting "as sysdba"? > > like: > > db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' > <http://67.220.186.115:15210/standby%27>, *sysdba=True*) > > Jakob > > > > Am 21.06.2017 um 09:36 schrieb Venky: > > Hi Folks, > > I need your help wrt below issue faced while connecting to SQL*Plus: > Release 12.1.0.2.0 Production on Wed Jun 21 06:50:43 2017 > using the below cx_Oracle python module. > > pip show cx_Oracle > > Name: cx-Oracle > > Version: 5.3 > > Summary: Python interface to Oracle > > Home-page: https://oracle.github.io/python-cx_Oracle > > Author: Anthony Tuininga > > Author-email: ant...@gm... > > License: BSD License > > Location: /usr/lib64/python2.7/site-packages > > Requires: > > Below are the oracle instant client files used. > > 1. oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm > 2. oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm > 3. oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm > > > >>> import cx_Oracle > > >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' > <http://67.220.186.115:15210/standby%27>); > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > cx_Oracle.OperationalError: ORA-01033: ORACLE initialization or shutdown > in progress > > Process ID: 0 > > Session ID: 0 Serial number: 0 > > > > - Master Oracle 12c is on the host 67.220.182.210 at port 1521 > - Below is the Oracle 12c instance running on host 67.220.186.115 at > port 15210 > - This instance will always be in mounted mode since this instance is > the result of the replication from master. > - I can connect to it using below manual steps but can't using > cx_Oracle as shown above. > > > ps -aef| grep pmon > > oracle 106 1 0 06:47 ? 00:00:00 ora_pmon_standby > > root 334 231 0 07:34 ? 00:00:00 grep --color=auto pmon > > > > cat $ORACLE_HOME/network/admin/listener.ora > > LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)( > PORT=1521)))) > > SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(GLOBAL_DBNAME= > standby)(ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_ > 1)(SID_NAME=standby))) > > > > cat $ORACLE_HOME/network/admin/tnsnames.ora > > TESTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)( > HOST=67.220.182.210)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTDB))) > > standby=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)( > HOST=0.0.0.0)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=standby))) > > > > lsnrctl status > > > LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 21-JUN-2017 07:28:49 > > > Copyright (c) 1991, 2014, Oracle. All rights reserved. > > > Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)( > PORT=1521))) > > STATUS of the LISTENER > > ------------------------ > > Alias LISTENER > > Version TNSLSNR for Linux: Version 12.1.0.2.0 - > Production > > Start Date 21-JUN-2017 06:47:09 > > Uptime 0 days 0 hr. 41 min. 40 sec > > Trace Level off > > Security ON: Local OS Authentication > > SNMP OFF > > Listener Parameter File /u01/app/oracle/product/12.1. > 0/dbhome_1/network/admin/listener.ora > > Listener Log File /u01/app/oracle/diag/tnslsnr/ > oracle-ldt1/listener/alert/log.xml > > Listening Endpoints Summary... > > (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) > > Services Summary... > > Service "standby" has 2 instance(s). > > Instance "standby", status UNKNOWN, has 1 handler(s) for this service... > > Instance "standby", status READY, has 1 handler(s) for this service... > > The command completed successfully > > > > $export ORACLE_SID=standby; sqlplus sys/apporbit as sysdba > > > SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 07:26:55 2017 > > > Copyright (c) 1982, 2014, Oracle. All rights reserved. > > > > Connected to: > > Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit > Production > > With the Partitioning, OLAP, Advanced Analytics and Real Application > Testing options > > > SQL> select status, database_status from v$instance; > > > STATUS DATABASE_STATUS > > ------------ ----------------- > > MOUNTED ACTIVE > > > SQL> select open_mode, database_role from v$database; > > > OPEN_MODE DATABASE_ROLE > > -------------------- ---------------- > > MOUNTED PHYSICAL STANDBY > > > > ~Venky > > > ------------------------------------------------------------------------------ > 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 lis...@li...https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > -- > Ing. Jakob Gurnhofer, BSc...@gu...https://gurn.at > > > ------------------------------------------------------------ > ------------------ > 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 > > |
From: Anthony T. <ant...@gm...> - 2017-06-21 14:33:29
|
On Wed, Jun 21, 2017 at 2:24 AM, Jakob Gurnhofer <ja...@gu...> wrote: > Hi Venky, > > > have you tried connecting "as sysdba"? > > like: > > db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' > <http://67.220.186.115:15210/standby%27>, *sysdba=True*) > The correct syntax is db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' <http://67.220.186.115:15210/standby%27>, *mode=cx_Oracle.SYSDBA*) http://cx-oracle.readthedocs.io/en/latest/module.html#cx_Oracle.connect > > Jakob > > > > Am 21.06.2017 um 09:36 schrieb Venky: > > Hi Folks, > > I need your help wrt below issue faced while connecting to SQL*Plus: > Release 12.1.0.2.0 Production on Wed Jun 21 06:50:43 2017 > using the below cx_Oracle python module. > > pip show cx_Oracle > > Name: cx-Oracle > > Version: 5.3 > > Summary: Python interface to Oracle > > Home-page: https://oracle.github.io/python-cx_Oracle > > Author: Anthony Tuininga > > Author-email: ant...@gm... > > License: BSD License > > Location: /usr/lib64/python2.7/site-packages > > Requires: > > Below are the oracle instant client files used. > > 1. oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm > 2. oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm > 3. oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm > > > >>> import cx_Oracle > > >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' > <http://67.220.186.115:15210/standby%27>); > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > cx_Oracle.OperationalError: ORA-01033: ORACLE initialization or shutdown > in progress > > Process ID: 0 > > Session ID: 0 Serial number: 0 > > > > - Master Oracle 12c is on the host 67.220.182.210 at port 1521 > - Below is the Oracle 12c instance running on host 67.220.186.115 at > port 15210 > - This instance will always be in mounted mode since this instance is > the result of the replication from master. > - I can connect to it using below manual steps but can't using > cx_Oracle as shown above. > > > ps -aef| grep pmon > > oracle 106 1 0 06:47 ? 00:00:00 ora_pmon_standby > > root 334 231 0 07:34 ? 00:00:00 grep --color=auto pmon > > > > cat $ORACLE_HOME/network/admin/listener.ora > > LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)( > PORT=1521)))) > > SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(GLOBAL_DBNAME= > standby)(ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_ > 1)(SID_NAME=standby))) > > > > cat $ORACLE_HOME/network/admin/tnsnames.ora > > TESTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)( > HOST=67.220.182.210)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTDB))) > > standby=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)( > HOST=0.0.0.0)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=standby))) > > > > lsnrctl status > > > LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 21-JUN-2017 07:28:49 > > > Copyright (c) 1991, 2014, Oracle. All rights reserved. > > > Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)( > PORT=1521))) > > STATUS of the LISTENER > > ------------------------ > > Alias LISTENER > > Version TNSLSNR for Linux: Version 12.1.0.2.0 - > Production > > Start Date 21-JUN-2017 06:47:09 > > Uptime 0 days 0 hr. 41 min. 40 sec > > Trace Level off > > Security ON: Local OS Authentication > > SNMP OFF > > Listener Parameter File /u01/app/oracle/product/12.1. > 0/dbhome_1/network/admin/listener.ora > > Listener Log File /u01/app/oracle/diag/tnslsnr/ > oracle-ldt1/listener/alert/log.xml > > Listening Endpoints Summary... > > (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) > > Services Summary... > > Service "standby" has 2 instance(s). > > Instance "standby", status UNKNOWN, has 1 handler(s) for this service... > > Instance "standby", status READY, has 1 handler(s) for this service... > > The command completed successfully > > > > $export ORACLE_SID=standby; sqlplus sys/apporbit as sysdba > > > SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 07:26:55 2017 > > > Copyright (c) 1982, 2014, Oracle. All rights reserved. > > > > Connected to: > > Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit > Production > > With the Partitioning, OLAP, Advanced Analytics and Real Application > Testing options > > > SQL> select status, database_status from v$instance; > > > STATUS DATABASE_STATUS > > ------------ ----------------- > > MOUNTED ACTIVE > > > SQL> select open_mode, database_role from v$database; > > > OPEN_MODE DATABASE_ROLE > > -------------------- ---------------- > > MOUNTED PHYSICAL STANDBY > > > > ~Venky > > > ------------------------------------------------------------------------------ > 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 lis...@li...https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > -- > Ing. Jakob Gurnhofer, BSc...@gu...https://gurn.at > > > ------------------------------------------------------------ > ------------------ > 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 > > |
From: Jakob G. <ja...@gu...> - 2017-06-21 08:43:39
|
Hi Venky, have you tried connecting "as sysdba"? like: db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' <http://67.220.186.115:15210/standby%27>, *sysdba=True*) Jakob Am 21.06.2017 um 09:36 schrieb Venky: > Hi Folks, > > I need your help wrt below issue faced while connecting to SQL*Plus: > Release 12.1.0.2.0 Production on Wed Jun 21 06:50:43 2017 > using the below cx_Oracle python module. > > pip show cx_Oracle > > Name: cx-Oracle > > Version: 5.3 > > Summary: Python interface to Oracle > > Home-page: https://oracle.github.io/python-cx_Oracle > > Author: Anthony Tuininga > > Author-email: ant...@gm... > <mailto:ant...@gm...> > > License: BSD License > > Location: /usr/lib64/python2.7/site-packages > > Requires: > > > Below are the oracle instant client files used. > > 1. oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm > 2. oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm > 3. oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm > > > >>> import cx_Oracle > > >>> db = > cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' > <http://67.220.186.115:15210/standby%27>); > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > cx_Oracle.OperationalError: ORA-01033: ORACLE initialization or > shutdown in progress > > Process ID: 0 > > Session ID: 0 Serial number: 0 > > > > * Master Oracle 12c is on the host 67.220.182.210 at port 1521 > * Below is the Oracle 12c instance running on host 67.220.186.115 at > port 15210 > * This instance will always be in mounted mode since this instance > is the result of the replication from master. > * I can connect to it using below manual steps but can't using > cx_Oracle as shown above. > > > ps -aef| grep pmon > > oracle 106 1 0 06:47 ? 00:00:00 ora_pmon_standby > > root 334 231 0 07:34 ? 00:00:00 grep --color=auto pmon > > > > > cat $ORACLE_HOME/network/admin/listener.ora > > LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))) > > SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(GLOBAL_DBNAME=standby)(ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1)(SID_NAME=standby))) > > > > > cat $ORACLE_HOME/network/admin/tnsnames.ora > > TESTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=67.220.182.210)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTDB))) > > standby=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=standby))) > > > > > lsnrctl status > > > LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 21-JUN-2017 07:28:49 > > > Copyright (c) 1991, 2014, Oracle. All rights reserved. > > > Connecting to > (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) > > STATUS of the LISTENER > > ------------------------ > > Alias LISTENER > > Version TNSLSNR for Linux: Version 12.1.0.2.0 - > Production > > Start Date 21-JUN-2017 06:47:09 > > Uptime 0 days 0 hr. 41 min. 40 sec > > Trace Level off > > Security ON: Local OS Authentication > > SNMP OFF > > Listener Parameter File > /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora > > Listener Log File > /u01/app/oracle/diag/tnslsnr/oracle-ldt1/listener/alert/log.xml > > Listening Endpoints Summary... > > (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) > > Services Summary... > > Service "standby" has 2 instance(s). > > Instance "standby", status UNKNOWN, has 1 handler(s) for this service... > > Instance "standby", status READY, has 1 handler(s) for this service... > > The command completed successfully > > > > > $export ORACLE_SID=standby; sqlplus sys/apporbit as sysdba > > > SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 07:26:55 2017 > > > Copyright (c) 1982, 2014, Oracle. All rights reserved. > > > > Connected to: > > Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit > Production > > With the Partitioning, OLAP, Advanced Analytics and Real Application > Testing options > > > SQL> select status, database_status from v$instance; > > > STATUS DATABASE_STATUS > > ------------ ----------------- > > MOUNTED ACTIVE > > > SQL> select open_mode, database_role from v$database; > > > OPEN_MODE DATABASE_ROLE > > -------------------- ---------------- > > MOUNTED PHYSICAL STANDBY > > > > > ~Venky > > > ------------------------------------------------------------------------------ > 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 -- Ing. Jakob Gurnhofer, BSc. ja...@gu... https://gurn.at |
From: Christopher J. <chr...@or...> - 2017-06-21 07:53:39
|
On 21/6/17 5:36 pm, Venky wrote: > Hi Folks, > > I need your help wrt below issue faced while connecting to SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 06:50:43 2017 > using the below cx_Oracle python module. That's the SQL*Plus version. What's the version of the Database itself? > > pip show cx_Oracle > > Name: cx-Oracle > > Version: 5.3 > > Summary: Python interface to Oracle > > Home-page: https://oracle.github.io/python-cx_Oracle > <https://urldefense.proofpoint.com/v2/url?u=https-3A__oracle.github.io_python-2Dcx-5FOracle&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=lLpUdeB4xTiOOWD6yGzxPFv2SHvPzg3yLT7kvD-ZfyU&m=DtZ9o24M9vSHIqUDe-jwxbMeBpcW8MNBOou-wpFFh6w&s=9DoI43S2CH_MzhIab5UEydPWocSUa_-GoQKMp772vdY&e=> > > Author: Anthony Tuininga > > Author-email: ant...@gm... <mailto:ant...@gm...> > > License: BSD License > > Location: /usr/lib64/python2.7/site-packages > > Requires: > > > Below are the oracle instant client files used. > > 1. oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm > 2. oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm > 3. oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm > > > >>> import cx_Oracle > > >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby' > <https://urldefense.proofpoint.com/v2/url?u=http-3A__67.220.186.115-3A15210_standby-27&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=lLpUdeB4xTiOOWD6yGzxPFv2SHvPzg3yLT7kvD-ZfyU&m=DtZ9o24M9vSHIqUDe-jwxbMeBpcW8MNBOou-wpFFh6w&s=Ce3OARdaY_3ssmUM4TZ__IsmXL5oakHk81qyuvdyY30&e=>); > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > cx_Oracle.OperationalError: ORA-01033: ORACLE initialization or shutdown in progress > > Process ID: 0 > > Session ID: 0 Serial number: 0 > > > I expect you'll get the same ORA-01033 in SQL*Plus when you connect with the equivalent syntax: sqlplus -l sys/apporbit@67.220.186.115:15210/standby (I hope that's not your actual password) Maybe you were looking for the cx_Oracle connection mode: mode = cx_Oracle.SYSDBA See http://cx-oracle.readthedocs.io/en/5.3/connection.html?highlight=sysdba Thanks for all the details. Chris > > * Master Oracle 12c is on the host 67.220.182.210 at port 1521 > * Below is the Oracle 12c instance running on host 67.220.186.115 at port 15210 > * This instance will always be in mounted mode since this instance is the result of the replication from master. > * I can connect to it using below manual steps but can't using cx_Oracle as shown above. > > > ps -aef| grep pmon > > oracle 106 1 0 06:47 ? 00:00:00 ora_pmon_standby > > root 334 231 0 07:34 ? 00:00:00 grep --color=auto pmon > > > > > cat $ORACLE_HOME/network/admin/listener.ora > > LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))) > > SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(GLOBAL_DBNAME=standby)(ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1)(SID_NAME=standby))) > > > > > cat $ORACLE_HOME/network/admin/tnsnames.ora > > TESTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=67.220.182.210)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTDB))) > > standby=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=standby))) > > > > > lsnrctl status > > > LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 21-JUN-2017 07:28:49 > > > Copyright (c) 1991, 2014, Oracle. All rights reserved. > > > Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) > > STATUS of the LISTENER > > ------------------------ > > Alias LISTENER > > Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production > > Start Date 21-JUN-2017 06:47:09 > > Uptime 0 days 0 hr. 41 min. 40 sec > > Trace Level off > > Security ON: Local OS Authentication > > SNMP OFF > > Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora > > Listener Log File /u01/app/oracle/diag/tnslsnr/oracle-ldt1/listener/alert/log.xml > > Listening Endpoints Summary... > > (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) > > Services Summary... > > Service "standby" has 2 instance(s). > > Instance "standby", status UNKNOWN, has 1 handler(s) for this service... > > Instance "standby", status READY, has 1 handler(s) for this service... > > The command completed successfully > > > > > $export ORACLE_SID=standby; sqlplus sys/apporbit as sysdba > > > SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 07:26:55 2017 > > > Copyright (c) 1982, 2014, Oracle. All rights reserved. > > > > Connected to: > > Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production > > With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options > > > SQL> select status, database_status from v$instance; > > > STATUS DATABASE_STATUS > > ------------ ----------------- > > MOUNTED ACTIVE > > > SQL> select open_mode, database_role from v$database; > > > OPEN_MODE DATABASE_ROLE > > -------------------- ---------------- > > MOUNTED PHYSICAL STANDBY > > > > > ~Venky > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot&d=DwICAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=lLpUdeB4xTiOOWD6yGzxPFv2SHvPzg3yLT7kvD-ZfyU&m=DtZ9o24M9vSHIqUDe-jwxbMeBpcW8MNBOou-wpFFh6w&s=5rPL6iwZ9A3a2xI8gZ48IUqwhKpzn88Ug_xcvp6coMA&e= > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_cx-2Doracle-2Dusers&d=DwICAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=lLpUdeB4xTiOOWD6yGzxPFv2SHvPzg3yLT7kvD-ZfyU&m=DtZ9o24M9vSHIqUDe-jwxbMeBpcW8MNBOou-wpFFh6w&s=QLx6f_vOPers7rE11yhpqIhI2UY1kn4WJtZRoAjyrFw&e= -- http://twitter.com/ghrd |
From: Venky <ven...@gm...> - 2017-06-21 07:36:35
|
Hi Folks, I need your help wrt below issue faced while connecting to SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 06:50:43 2017 using the below cx_Oracle python module. pip show cx_Oracle Name: cx-Oracle Version: 5.3 Summary: Python interface to Oracle Home-page: https://oracle.github.io/python-cx_Oracle Author: Anthony Tuininga Author-email: ant...@gm... License: BSD License Location: /usr/lib64/python2.7/site-packages Requires: Below are the oracle instant client files used. 1. oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm 2. oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm 3. oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm >>> import cx_Oracle >>> db = cx_Oracle.connect('sys','apporbit','67.220.186.115:15210/standby'); Traceback (most recent call last): File "<stdin>", line 1, in <module> cx_Oracle.OperationalError: ORA-01033: ORACLE initialization or shutdown in progress Process ID: 0 Session ID: 0 Serial number: 0 - Master Oracle 12c is on the host 67.220.182.210 at port 1521 - Below is the Oracle 12c instance running on host 67.220.186.115 at port 15210 - This instance will always be in mounted mode since this instance is the result of the replication from master. - I can connect to it using below manual steps but can't using cx_Oracle as shown above. ps -aef| grep pmon oracle 106 1 0 06:47 ? 00:00:00 ora_pmon_standby root 334 231 0 07:34 ? 00:00:00 grep --color=auto pmon cat $ORACLE_HOME/network/admin/listener.ora LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))) SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(GLOBAL_DBNAME=standby)(ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1)(SID_NAME=standby))) cat $ORACLE_HOME/network/admin/tnsnames.ora TESTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=67.220.182.210)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTDB))) standby=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=standby))) lsnrctl status LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 21-JUN-2017 07:28:49 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date 21-JUN-2017 06:47:09 Uptime 0 days 0 hr. 41 min. 40 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/oracle-ldt1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521))) Services Summary... Service "standby" has 2 instance(s). Instance "standby", status UNKNOWN, has 1 handler(s) for this service... Instance "standby", status READY, has 1 handler(s) for this service... The command completed successfully $export ORACLE_SID=standby; sqlplus sys/apporbit as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Wed Jun 21 07:26:55 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> select status, database_status from v$instance; STATUS DATABASE_STATUS ------------ ----------------- MOUNTED ACTIVE SQL> select open_mode, database_role from v$database; OPEN_MODE DATABASE_ROLE -------------------- ---------------- MOUNTED PHYSICAL STANDBY ~Venky |
From: Anthony T. <ant...@gm...> - 2017-06-17 00:03:32
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python 2.x and 3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install cx_Oracle 6.0rc1 is via pip as in python -m pip install cx_Oracle --upgrade --pre Note that the --pre option is required since this is a prerelease. What's new? This release focused on correcting issues discovered over the past month and polishing items in preparation for a production release. The full release notes can be read here: http://cx-oracle.readthedocs.io/en/latest/releasenotes.html#version-6-0-rc-1-june-2017 Please provide any feedback via GitHub issues ( https://github.com/oracle/python-cx_Oracle/issues). |
From: Laura L. <lau...@gm...> - 2017-05-25 10:46:27
|
and it is really useful :) Thank u 2017-05-24 22:06 GMT+02:00 Anthony Tuininga <ant...@gm...>: > What is cx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle > Database for Python 2.x and 3.x and conforms to the Python database API 2.0 > specifications with a number of enhancements. > > > Where do I get it? > https://oracle.github.io/python-cx_Oracle > > The easiest method to install cx_Oracle 6.0b1 is via pip as in > > python -m pip install cx_Oracle --upgrade --pre > > Note that the --pre option is required since this is a prerelease. > > > What's new? > > This release focused on correcting issues discovered over the past month > and polishing items in preparation for a production release. The full > release notes can be read here: > > http://cx-oracle.readthedocs.io/en/latest/releasenotes. > html#version-6-0-beta-2-may-2017 > > Please provide any feedback via GitHub issues ( > https://github.com/oracle/python-cx_Oracle/issues). > > ------------------------------------------------------------ > ------------------ > 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 > > -- ______________________________________________________________________ Laura Lacarra Arcos @lauralacarra <https://twitter.com/#!/LauraLacarra> |
From: Anthony T. <ant...@gm...> - 2017-05-24 20:06:39
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python 2.x and 3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install cx_Oracle 6.0b1 is via pip as in python -m pip install cx_Oracle --upgrade --pre Note that the --pre option is required since this is a prerelease. What's new? This release focused on correcting issues discovered over the past month and polishing items in preparation for a production release. The full release notes can be read here: http://cx-oracle.readthedocs.io/en/latest/releasenotes.html#version-6-0-beta-2-may-2017 Please provide any feedback via GitHub issues (https://github.com/oracle/ python-cx_Oracle/issues). |
From: M.M.Rashid (Rubel) <mm...@gm...> - 2017-05-17 01:32:15
|
The issue has been resolved. Compiling in cmd line worked. Cheers, Rashid On Tue, May 16, 2017 at 9:36 PM, M.M.Rashid (Rubel) <mm...@gm...> wrote: > Dear All, > > Due to in house python distribution which was compiled in MSC++ v2010, I > had to compile cx_Oracle with the same version. In doing so, I am having > two issues: > > > > - If I compile in DEBUG mode, I get this error: > > * LINK : fatal error LNK1104: cannot open file 'python27_d.lib'* > > in my python instillation, I only have release library - > python27.lib > > - So, I tried to compile in Release mode and this time it links fine. > I got the cx_oracle.pyd. Copying the pyd in sys.path and then trying to > import gives this error: > > > *Python 2.7.11 (default, Mar 10 2016, 10:58:13) [MSC v.1600 64 bit > (AMD64)] on win32* > *Type "help", "copyright", "credits" or "license" for more information.* > > *>>> import cx_Oracle* > > *Traceback (most recent call last):* > > * File "<stdin>", line 1, in <module>* > > *ImportError: dynamic module does not define init function (initcx_Oracle)* > > *>>>* > > > > What steps am I missing here? > > -- > M. M. RASHID(Rubel) > Perth, Australia. > > > -- M. M. RASHID(Rubel) Perth, Australia. E-mail: mm...@gm... Phone: +61 406996028 (Mobile) |
From: Amaury F. d'A. <ama...@gm...> - 2017-05-16 14:42:13
|
Hi, If you build the extension manually, you have to ensure that the init function is correctly exported by the dll. Either add this to the link command line: /EXPORT:initcx_Oracle or modify cx_Oracle.c, at the very bottom of the file: __declspec(dllexport) void initcx_Oracle(void) { 2017-05-16 15:36 GMT+02:00 M.M.Rashid (Rubel) <mm...@gm...>: > Dear All, > > Due to in house python distribution which was compiled in MSC++ v2010, I > had to compile cx_Oracle with the same version. In doing so, I am having > two issues: > > > > - If I compile in DEBUG mode, I get this error: > > * LINK : fatal error LNK1104: cannot open file 'python27_d.lib'* > > in my python instillation, I only have release library - > python27.lib > > - So, I tried to compile in Release mode and this time it links fine. > I got the cx_oracle.pyd. Copying the pyd in sys.path and then trying to > import gives this error: > > > *Python 2.7.11 (default, Mar 10 2016, 10:58:13) [MSC v.1600 64 bit > (AMD64)] on win32* > *Type "help", "copyright", "credits" or "license" for more information.* > > *>>> import cx_Oracle* > > *Traceback (most recent call last):* > > * File "<stdin>", line 1, in <module>* > > *ImportError: dynamic module does not define init function (initcx_Oracle)* > > *>>>* > > > > What steps am I missing here? > > -- > M. M. RASHID(Rubel) > Perth, Australia. > > > > ------------------------------------------------------------ > ------------------ > 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 > > -- Amaury Forgeot d'Arc |