Re: [sqlalchemy] Re: SQLAlchemy: UnicodeEncodeError: 'ascii' codec can't encode characters (db engine encoding ignored?)

2020-05-06 Thread Anno Nühm
Adding the encoding parameter to the connection string did do the trick. With this now my test code is running perfectly fine, rendering the results as expected. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please

Re: [sqlalchemy] Re: SQLAlchemy: UnicodeEncodeError: 'ascii' codec can't encode characters (db engine encoding ignored?)

2020-05-06 Thread Mike Bayer
Alternatively, this will probably work as well, SQLAlchemy will pass it through to the client: create_engine("oracle+cx_oracle://user:pass@dsn/?encoding=utf-8") will update the docs now. >>> e = >>> create_engine("oracle+cx_oracle://scott:tiger@oracle1120/?encoding=utf-8") >>>

Re: [sqlalchemy] Re: SQLAlchemy: UnicodeEncodeError: 'ascii' codec can't encode characters (db engine encoding ignored?)

2020-05-06 Thread Mike Bayer
I see you are using an "encoding" on cx_Oracle connect(), which SQLAlchemy does not use; this parameter appears to be added to cx_Oracle only recently. The standard way to set Oracle encodings is via the NLS_LANG environment variable, please use this parameter when dealing with Oracle client

Re: [sqlalchemy] Re: SQLAlchemy: UnicodeEncodeError: 'ascii' codec can't encode characters (db engine encoding ignored?)

2020-05-06 Thread Anno Nühm
Engine object configuration - convert_unicode = False - cx_oracle_ver = (7, 3, 0) - driver = cx_oracle - encoding = UTF8 - nencoding = -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an

Re: [sqlalchemy] Re: SQLAlchemy: UnicodeEncodeError: 'ascii' codec can't encode characters (db engine encoding ignored?)

2020-05-06 Thread Simon King
What are the values of "encoding" and "nencoding" on the connection object? https://github.com/oracle/python-cx_Oracle/issues/36 https://stackoverflow.com/a/37600367/395053 You probably need to grab the raw dbapi connection:

[sqlalchemy] Re: SQLAlchemy: UnicodeEncodeError: 'ascii' codec can't encode characters (db engine encoding ignored?)

2020-05-06 Thread Anno Nühm
## Traceback (most recent call last): File "/data/projects/Python/database/sqlalchemy/sqlalchemy_oracle.py", line 45, in df = pd.read_sql_query(u'SELECT owner, table_name FROM all_tables WHERE owner LIKE \'äöüßÄÖÜœ\'',

[sqlalchemy] Re: SQLAlchemy: UnicodeEncodeError: 'ascii' codec can't encode characters (db engine encoding ignored?)

2020-05-06 Thread Anno Nühm
## Traceback (most recent call last): File "/data/projects/Python/database/sqlalchemy/sqlalchemy_oracle.py", line 45, in df = pd.read_sql_query(u'SELECT owner, table_name FROM all_tables WHERE owner LIKE \'äöüßÄÖÜœ\'',