cx_oracle jupyter notebook NLS_LANG错误

问题描述 投票:0回答:1

在sqlplus脚本中,我这样做了

unset NLS_LANG

我如何在jupyter笔记本中为cx_oracle做同样的事情?

我正在关注这个例子并得到了错误。

How can I access Oracle from Python?

DatabaseError: ORA-12705: Cannot access NLS data files or invalid environment specified
python pandas dataframe cx-oracle
1个回答
0
投票

之前我遇到了同样的错误,我通过运行alter命令在代码下面运行以设置语言。确保你事后提交。

c.execute(u'ALTER SESSION SET NLS_LANGUAGE=American')
© www.soinside.com 2019 - 2024. All rights reserved.