New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 53: invalid configuration byte #40

Closed
denchik20071992 opened this Issue Jun 15, 2017 · 9 comments

Comments

Projects
None yet
2 participants
@denchik20071992
Copy link

denchik20071992 commented Jun 15, 2017

Delete irrelevant parts of this template.

For general questions:

Describe exactly what you did and what you want to happen.
Use the questions at the bottom of this template as a guide.

Use Markdown syntax, particularly for code blocks: see https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code

For security issues:

See https://www.oracle.com/support/assurance/vulnerability-remediation/reporting-security-vulnerabilities.html for how to report security issues.

For installation issues:

Use a gist for screen output and logs: see https://gist.github.com/
Do not paste long output into this issue

Review the install instructions at
https://github.com/oracle/python-cx_Oracle#installation

Review your output and logs. Google any errors

Answer the following questions:

  1. What is your version of Python? Is it 32-bit or 64-bit?
    64

  2. What is your version of cx_Oracle?
    cx_Oracle-6.0b2-cp36-cp36m-win_amd64.whl

  3. What is your version of the Oracle client (e.g. Instant Client)? How was it
    installed? Where is it installed?

  4. What is your version of the Oracle Database?
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Producti

  5. What is your OS and version?
    windows 7

  6. What error(s) you are seeing?
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 53: invalid configuration byte

  7. Using Anaconda 4.3.0 (64bit), python 3.6.0, 64

@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Jun 15, 2017

Please provide the code you are executing which is causing the error and the full traceback.

@denchik20071992

This comment has been minimized.

Copy link
Author

denchik20071992 commented Jun 19, 2017

@anthony-tuininga ,
just
import cx_Oracle

@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Jun 19, 2017

Hmmm, are you able to try without Anaconda? I'll see if I can replicate the issue with Anaconda myself.

@denchik20071992

This comment has been minimized.

Copy link
Author

denchik20071992 commented Jun 19, 2017

What do you mean "without Anaconda?"
I can start python session from cmd, but it'will start also Anaconda's version of python.
I just checked by launching python session from cmd, the same result

@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Jun 19, 2017

I mean -- running a base Python installation, not Anaconda's version of Python.

@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Jun 20, 2017

I just downloaded and installed Anaconda 4.4.0 (64-bit, Python 3.6) on my machine. I then ran the command prompt option and issued the command

python -m pip install cx_Oracle --pre

When I called Python (now 3.6.1) and imported cx_Oracle it worked as expected. I did not get the error you received. Are you able to download and install 4.4.0 as well to see if that resolves the issue for you?

@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Jul 5, 2017

I have discovered the source of this issue. The problem is that the error message that Windows is providing is in a different encoding than the assumed UTF-8. The error message is that the Oracle client library cannot be found or is incompatible with Python and cx_Oracle. I am working on a solution so that the correct error message will be returned properly.

anthony-tuininga added a commit that referenced this issue Jul 5, 2017

On Windows, convert system message to Unicode first, then to UTF-8; o…
…therwise,

the error message returned could be in a mix of encodings
(#40).
@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Jul 5, 2017

I have pushed a commit that corrects this. If you are able to test this for yourself, please do so. Thanks!

Note that you want to issue the following commands in order to get the changes:

git pull
git submodule update

@anthony-tuininga

This comment has been minimized.

Copy link
Member

anthony-tuininga commented Jul 25, 2017

Change has been integrated into cx_Oracle 6.0rc2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment