Issue #147: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128) (conservancy/kallithea)

Udo Spallek issues-reply at bitbucket.org
Thu Jul 23 09:36:11 UTC 2015


New issue 147: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)
https://bitbucket.org/conservancy/kallithea/issues/147/unicodeencodeerror-ascii-codec-cant-encode

Udo Spallek:

Related Issue #9

When I try to create a kallithea fork of this repository `https://code.google.com/p/hgnested/`
an error is raised.
In the hg log is an author with Name "Cédric" which makes use of the character  u'\xe9'.

TIA and best regards
Udo


```
#!pytb

File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/weberror/errormiddleware.py', line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/beaker/middleware.py', line 155 in __call__
  return self.wrap_app(environ, session_start_response)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/routes/middleware.py', line 131 in __call__
  response = self.app(environ, start_response)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 107 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/wsgiapp.py', line 312 in dispatch
  return controller(environ, start_response)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/base.py', line 383 in __call__
  return WSGIController.__call__(self, environ, start_response)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 211 in __call__
  response = self._dispatch_call()
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 162 in _dispatch_call
  response = self._inspect_call(func)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 105 in _inspect_call
  result = self._perform_call(func, args)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/controllers/core.py', line 57 in _perform_call
  return func(**args)
File '<string>', line 2 in index
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/auth.py', line 782 in __wrapper
  return func(*fargs, **fkwargs)
File '<string>', line 2 in index
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/auth.py', line 841 in __wrapper
  return func(*fargs, **fkwargs)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/controllers/summary.py', line 180 in index
  return render('summary/summary.html')
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/templating.py', line 243 in render_mako
  cache_type=cache_type, cache_expire=cache_expire)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/templating.py', line 218 in cached_template
  return render_func()
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/pylons/templating.py', line 240 in render_template
  return literal(template.render_unicode(**globs))
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/mako/template.py', line 452 in render_unicode
  as_unicode=True)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/mako/runtime.py', line 803 in _render
  **_kwargs_for_callable(callable_, data))
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/mako/runtime.py', line 835 in _render_context
  _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/mako/runtime.py', line 855 in _exec_template
  _render_error(template, context, compat.exception_as())
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/mako/runtime.py', line 864 in _render_error
  result = template.error_handler(context, error)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/mako/runtime.py', line 853 in _exec_template
  callable_(context, *args, **kwargs)
File '/var/local/kallithea/data/templates/base/root.html.py', line 209 in render_body
  __M_writer(escape(next.body()))
File '/var/local/kallithea/data/templates/base/base.html.py', line 42 in render_body
  __M_writer(escape(next.main()))
File '/var/local/kallithea/data/templates/summary/summary.html.py', line 241 in render_main
  runtime._include_file(context, u'../changelog/changelog_summary_data.html', _template_uri)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/mako/runtime.py', line 730 in _include_file
  callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs))
File '/var/local/kallithea/data/templates/changelog/changelog_summary_data.html.py', line 79 in render_body
  __M_writer(escape(h.person(cs.author)))
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/helpers.py', line 518 in person
  user = user_or_none(author)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/helpers.py', line 487 in user_or_none
  user = User.get_by_username(author_name(author), case_insensitive=True, cache=True)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/model/db.py', line 541 in get_by_username
  return q.scalar()
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 2215 in scalar
  ret = self.one()
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 2184 in one
  ret = list(self)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/caching_query.py', line 80 in __iter__
  return self.get_value(createfunc=lambda:
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/caching_query.py', line 99 in get_value
  ret = cache.get_value(cache_key, createfunc=createfunc)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/beaker/cache.py', line 305 in get
  return self._get_value(key, **kw).get_value()
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/beaker/container.py', line 385 in get_value
  v = self.createfunc()
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/kallithea/lib/caching_query.py', line 81 in <lambda>
  list(Query.__iter__(self)))
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 2227 in __iter__
  return self._execute_and_instances(context)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py', line 2242 in _execute_and_instances
  result = conn.execute(querycontext.statement, self._params)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1449 in execute
  params)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1584 in _execute_clauseelement
  compiled_sql, distilled_params
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py', line 1691 in _execute_context
  context)
File '/usr/share/python/kallithea/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py', line 331 in do_execute
  cursor.execute(statement, parameters)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)
```





More information about the kallithea-general mailing list