Issue #43 new

German language not working - with server crashing beyond stopping

Anonymous created an issue

If I set my preferred language to de_de, the game crashes (log below). If this happened, I need to kill -9 the server, to free the port again.

Change tools.py line 72:

translations = Translations(fileobj=mo_file)

to

translations = Translations(mo_file)

and everything works. I just don't know, if it's correct. :)

Crashlog

 jester@khnum ~/devel/domination/domination (hg)-[default] % ./main.py -p 12346 -a -D
/usr/lib64/python2.7/site-packages/karnickel.py:63: RuntimeWarning: Parent module 'domination.cards' not found while handling absolute import
  mod = __import__(module, dict, None, ['*'])
 * Running on http://0.0.0.0:12346/
 * Restarting with reloader
/usr/lib64/python2.7/site-packages/karnickel.py:63: RuntimeWarning: Parent module 'domination.cards' not found while handling absolute import
  mod = __import__(module, dict, None, ['*'])
127.0.0.1 - - [11/Oct/2013 23:02:04] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/jester/devel/domination/domination/gzip_middleware.py", line 30, in __call__
    app_iter = self.app(environ, dummy_start_response)
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/jester/devel/domination/domination/main.py", line 163, in index
    return render_template('index.html', runners=runners)
  File "/usr/lib64/python2.7/site-packages/flask/templating.py", line 128, in render_template
    context, ctx.app)
  File "/usr/lib64/python2.7/site-packages/flask/templating.py", line 110, in _render
    rv = template.render(context)
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib64/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/jester/devel/domination/domination/templates/index.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/home/jester/devel/domination/domination/templates/base.html", line 4, in top-level template code
    {% block head %}
  File "/home/jester/devel/domination/domination/templates/base.html", line 19, in block "head"
    <title>{% block title %}{% endblock %}  Domination</title>
  File "/home/jester/devel/domination/domination/templates/index.html", line 2, in block "title"
    {% block title %}{% trans %}Overview{% endtrans %}{% endblock %}
  File "/usr/lib64/python2.7/site-packages/markupsafe/__init__.py", line 71, in __new__
    return text_type.__new__(cls, base)
  File "/home/jester/devel/domination/domination/tools.py", line 24, in __unicode__
    t = get_translations()
  File "/home/jester/devel/domination/domination/tools.py", line 72, in get_translations
    translations = Translations(fileobj=mo_file)
TypeError: __init__() got an unexpected keyword argument 'fileobj'
127.0.0.1 - - [11/Oct/2013 23:02:05] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
127.0.0.1 - - [11/Oct/2013 23:02:05] "GET /?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
127.0.0.1 - - [11/Oct/2013 23:02:05] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
127.0.0.1 - - [11/Oct/2013 23:02:05] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
127.0.0.1 - - [11/Oct/2013 23:02:06] "GET /?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
127.0.0.1 - - [11/Oct/2013 23:02:06] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
127.0.0.1 - - [11/Oct/2013 23:02:06] "GET /?__debugger__=yes&cmd=resource&f=source.png HTTP/1.1" 200 -

Comments (1)

  1. Log in to comment