Question: UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2018' in position 534: ordinal not in range(256)
0
gravatar for yychangsd
2.2 years ago by
yychangsd30
yychangsd30 wrote:

My local galaxy instance is connected with mysql.

When I run a job I get an error:

Traceback (most recent call last):

File "/home/oasis/data/galaxy-new/lib/galaxy/jobs/runners/local.py", line 128, in queue_job job_wrapper.finish( stdout, stderr, exit_code )

File "/home/oasis/data/galaxy-new/lib/galaxy/jobs/__init__.py", line 1278, in finish self.sa_session.flush()

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 150, in do return getattr(self.registry(), name)(args, *kwargs)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2004, in flush self._flush(objects)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2122, in _flush transaction.rollback(_capture_exception=True)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__ compat.reraise(exc_type, exc_value, exc_tb)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2086, in _flush flush_context.execute()

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 373, in execute rec.execute(self)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 532, in execute uow

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 170, in save_obj mapper, table, update)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 692, in _emit_update_statements execute(statement, multiparams)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement compiled_sql, distilled_params

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context context)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1344, in _handle_dbapi_exception util.reraise(*exc_info)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context context)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute cursor.execute(statement, parameters)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 187, in execute query = query % tuple([db.literal(item) for item in args])

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 278, in literal return self.escape(o, self.encoders)

File "/home/oasis/data/galaxy-new/.venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 208, in unicode_literal return db.literal(u.encode(unicode_literal.charset))

UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2018' in position 534: ordinal not in range(256)

I guess it may be caused by mysql ..

Any suggestions would be greatly appreciated..

Thanks...

error admin jobs local unicode • 1.4k views
ADD COMMENTlink written 2.2 years ago by yychangsd30
1
gravatar for Devon Ryan
2.2 years ago by
Devon Ryan1.9k
Germany
Devon Ryan1.9k wrote:

I had an error somewhat like this with postgresql about a year ago. The fix was to convert the database to use the unicode codec. Having said that, since this is happening with the local job runner I wonder if you just have a funky character in job_conf.xml.

ADD COMMENTlink written 2.2 years ago by Devon Ryan1.9k

Thanks for your comments.

Actually I used this to convert my galaxy_db in mysql: mysql> ALTER DATABASE galaxy_db CHARACTER SET utf8 COLLATE utf8_unicode_ci; Query OK, 1 row affected (0.01 sec)

And I also checked job_conf.xml. It seems fine.

But I still get this error...

ADD REPLYlink written 2.2 years ago by yychangsd30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 172 users visited in the last hour