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: https://docs.sqlalchemy.org/en/13/core/connections.html#working-with-raw-dbapi-connections On Wed, May 6, 2020 at 11:46 AM Anno Nühm <anno.me.nu...@gmail.com> wrote: > > ###################################################################### > Traceback (most recent call last): > File "/data/projects/Python/database/sqlalchemy/sqlalchemy_oracle.py", line > 45, in <module> > df = pd.read_sql_query(u'SELECT owner, table_name FROM all_tables WHERE > owner LIKE \'äöüßÄÖÜœ\'', con) > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/pandas/io/sql.py", > line 326, in read_sql_query > return pandas_sql.read_query( > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/pandas/io/sql.py", > line 1218, in read_query > result = self.execute(*args) > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/pandas/io/sql.py", > line 1087, in execute > return self.connectable.execute(*args, **kwargs) > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/sqlalchemy/engine/base.py", > line 976, in execute > return self._execute_text(object_, multiparams, params) > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/sqlalchemy/engine/base.py", > line 1145, in _execute_text > ret = self._execute_context( > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/sqlalchemy/engine/base.py", > line 1287, in _execute_context > self._handle_dbapi_exception( > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/sqlalchemy/engine/base.py", > line 1485, in _handle_dbapi_exception > util.raise_(exc_info[1], with_traceback=exc_info[2]) > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/sqlalchemy/util/compat.py", > line 178, in raise_ > raise exception > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/sqlalchemy/engine/base.py", > line 1247, in _execute_context > self.dialect.do_execute( > File > "/opt/pyenv/versions/3.8.2/lib/python3.8/site-packages/sqlalchemy/engine/default.py", > line 590, in do_execute > cursor.execute(statement, parameters) > UnicodeEncodeError: 'ascii' codec can't encode characters in position 60-66: > ordinal not in range(128) > ###################################################################### > > > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/38aa0bb8-93f3-4bc7-a771-19a84a17670d%40googlegroups.com. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/CAFHwexeTz2vmLzusfPWXeL9PhSrMnQPhbKY0xY9d1oUfPWkB0w%40mail.gmail.com.