python cx oracle expecting string, unicode or buffer object

前端 未结 1 1710
天涯浪人
天涯浪人 2021-01-16 18:27

I am trying to run following code snippet in python to connect to oracle, but constantly running into following error. I have tried a lot of combinations but it doesn\'t see

相关标签:
1条回答
  • 2021-01-16 18:36

    If you are running into this problem, most likely the cause is that you are not passing in arguments required by the underlying dbapi call.

    In my case I added additional arguments of user, password and dsn to the create_engine call along with existing ones, which got passed to cx_oracle call and it worked.

    something like this should work

    create_engine(u'oracle+cx_oracle://localhost:1521/orcl', echo=True, user='<>', password='<>', dsn='<>')
    
    0 讨论(0)
提交回复
热议问题