I get a UnicodeDecodeError when trying to connect to oracle with python sqlalchemy

When I try to connect to oracle with Python3.7 sqlalchemy, I get the following error. It seems that cx_Oracle alone can connect to oracle, so I didn't understand what caused it.

I couldn't get to the information easily Since encoding and charset have taken a long detour, I will describe them.

reference) http://blog.kzfmix.com/entry/1361525164

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x98 in position 11: invalid start byte

The error was resolved by embedding the following in the py source.

import  os
os.environ["NLS_LANG"] = "JAPANESE_JAPAN.AL32UTF8"

Recommended Posts

I get a UnicodeDecodeError when trying to connect to oracle with python sqlalchemy
I get a UnicodeDecodeError when running with mod_wsgi
[python] A note when trying to use numpy with Cython
I get [Error 2055] when trying to connect to MySQL on Heroku
I got stuck when trying to specify a relative path with relative_to () in python
A memorandum when I tried to get it automatically with selenium
[Python] A memo that I tried to get started with asyncio
I get an error when trying to install maec 4.0.1.0 with pip
A note I was addicted to when creating a table with SQLAlchemy
I want to make a game with Python
A story I was addicted to trying to get a video url with tweepy
I tried to get CloudWatch data with Python
[Python / Pandas] A bug occurs when trying to replace a DataFrame with `None` with` replace`
I want to write to a file with Python
A layman wants to get started with Python
An error occurs when trying to import scikit-learn after connecting to Oracle with SQLAlchemy
When I tried to create a virtual environment with Python, it didn't work
When I connect to a remote Jupyter Server with VScode, it's remote but local
When I tried to connect with SSH, I got a warning about free space.
A note I was addicted to when running Python with Visual Studio Code
A story that I was addicted to when I made SFTP communication with python
I tried to get started with blender python script_Part 01
I tried to draw a route map with Python
I tried to get started with blender python script_Part 02
I want to work with a robot in python.
I tried to automatically generate a password with Python3
I want to run a quantum computer with Python
Connect to BigQuery with Python
Connect to Wikipedia with Python
[Python] I want to use only index when looping a list with a for statement
A memo of misunderstanding when trying to load the entire self-made module with Python3
I made a package to filter time series with python
I wrote a program quickly to study DI with Python ①
[Python] I want to get a common set between numpy
I tried "How to get a method decorated in Python"
I tried to get started with Hy ・ Define a class
I get a UnicodeDecodeError in mecab-python3
Link to get started with python
Connect to multiple databases with SQLAlchemy
I made a fortune with Python.
How to get started with Python
A program that failed when trying to create a linebot with reference to "Dialogue system made with python"
[Solution] When I try to connect to CloudSQL with GAE, I get an ImportError only when using dev_appserver.
I want to debug with Python
I made a daemon with Python
It was a painful memory when I was told TypeError: must be type, not class obj when trying to inherit with Python.
[5th] I tried to make a certain authenticator-like tool with python
I made a library to easily read config files with Python
I want to use a wildcard that I want to shell with Python remove
[2nd] I tried to make a certain authenticator-like tool with python
[3rd] I tried to make a certain authenticator-like tool with python
I tried to create a list of prime numbers with python
I want to do a full text search with elasticsearch + python
What to do if you get a UnicodeDecodeError with pip install
I tried to make a 2channel post notification application with Python
[Python] How to get a value with a key other than value with Enum
I wanted to solve the ABC164 A ~ D problem with Python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I get a can't set attribute when using @property in python
I tried to make a todo application using bottle with python
[4th] I tried to make a certain authenticator-like tool with python