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 bytes in position 96-97: invalid continuation byte #65
Comments
If you changed to a 64-bit Python, you will also need to change to a 64-bit Oracle client. The message you got looks similar to one from an older version of cx_Oracle 6.0. Can you check to see what version of cx_Oracle you are using, too? |
Looks like your 32-bit 11g installation is first in the path? You need to make sure your 64-bit Oracle client is first in the path. You sure seem to have a lot of different Oracle clients, too! Can you also set the environment variable DPI_DEBUG_LEVEL=31 and try running the code again? |
by the way, |
Are you using Python from the command prompt? Or some form of IDE? |
Also, the connection parameters don't look valid. Can you use those parameters to connect to the database using SQL*Plus? |
If you changed the PATH environment variable in the GUI, you have to restart your command prompt or PyCharm before it will take effect. Perhaps that was the source of your issue? I'd still like to know why you got the error message you did. If you are able to run Python from the command prompt using the old invalid PATH and with DPI_DEBUG_LEVEL=31 and provide the output you get, that would be very helpful. Thanks! |
dear sir.. |
Ok. Thanks for your help. |
I had this problem and here is my solution: |
For general questions:
i had success to use cx_Oracle 5.3+Python 32bit before!
now i reinstall my python from 3.6 32bit to 3.6 64bit, and use cx_Oralce6.0 !
i try to install it from pypi, and try to install by using pip install cx_Oracle,
both the same question
i can import cx_Oracle
but while i use cx_Oracle.connect then it's error ,the error message:
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 96-97: invalid continuation byte
Answer the following questions:
What is your version of Python? Is it 32-bit or 64-bit?
Python 3.6 64bit
What is your version of cx_Oracle?
6.0
What is your version of the Oracle client (e.g. Instant Client)? How was it
installed? Where is it installed?
11g
What is your version of the Oracle Database?
11g
What is your OS and version?
windows 7 64bit
What compiler version did you use? For example, with GCC, run
gcc --version
.i just use cmd to run python
What environment variables did you set? How exactly did you set them?
What exact command caused the problem (e.g. what command did you try to
install with)? Who were you logged in as?
cx_Oracle.connect('count', 'password', 'oracleclient')
What error(s) you are seeing?
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 96-97: invalid
continuation byte
The text was updated successfully, but these errors were encountered: