Re: [cx-oracle-users] Using cx_Oracle 6.0rc1 on Windows
Brought to you by:
atuining
From: Walter D. <wa...@li...> - 2017-07-06 15:48:38
|
On 6 Jul 2017, at 0:45, Anthony Tuininga wrote: > On Wed, Jul 5, 2017 at 4:12 PM, Anthony Tuininga > <ant...@gm... >> wrote: > >> [...] >> I have discovered the source of the problem. I was able to replicate >> the >> issue thanks to this pointer and have corrected it in the source. If >> you >> can do a new pull and compile you should get the correct error >> message now. >> If you can confirm that would be helpful! Thanks. >> > > Just to be clear since the process is a bit different now: in your > cx_Oracle repository you need to issue the following commands: > > git pull > git submodule update "git submodule update" doesn't seem to do anything. Do we need a special git configuration for that? Making odpi empty and doing "git clone https://github.com/oracle/odpi" helps. > That will update ODPI-C (where the correction was made) as well as > cx_Oracle itself. With this (and a python -v), we do indeed get the following: 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 cx_Oracle.DatabaseError: DPI-1047: Oracle Client library cannot be loaded: %1 ist keine zulässige Win32-Anwendung. See https://oracle.github.io/odpi/doc/installation.html for help >>>> [...] >>>> 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. >> >> This is a limitation of Windows and there isn't much that can be done >> about it. Sorry! May be the %1 is supposed to be the argument that was passed to LoadLibrary()? According to the documentation of FormatMessageW() at https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx it should by possible to pass in arguments to FormatMessageW() in the last parameter. At least this would mean that the user gets to see the path to the cx_Oracle DLL. Of course it would be better, if we could see which DLL ultimately is the problem. >>>> But now for the real error... >>>> >>>> [...] >>>>> >>>>> 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. OK, the list is here: http://styx.livinglogic.de/~walter/cx_Oracle/VCRedistributables.png > [...] Servus, Walter |