ksjdgygfuvhkdu
南沙无叶
2019-01-29 13:18

pycharm引用cx_oracle报错

  • python

import cx_Oracle直接报错

Traceback (most recent call last):
  File "D:/Documents/Py_file/py_excel/open_oracle.py", line 3, in <module>
    import cx_Oracle
  File "D:\Program Files (x86)\Python36-32\lib\site-packages\cx_Oracle\__init__.py", line 10, in <module>
    from custom_exceptions import Warning, Error, InterfaceError, DatabaseError, DataError, OperationalError, IntegrityError, InternalError, ProgrammingError, NotSupportedError
ModuleNotFoundError: No module named 'custom_exceptions'

代码之前运行是没问题的,后面因为使用了一下sqlite3模块,为了消除if not exists下面的小红线,就Alt+Enter,把数据库变成了sqlite,再之后import cx_Oracle就报错了。

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答