Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError when testing pootle with runserver command #6918

Open
tasso85 opened this issue Jun 7, 2022 · 1 comment
Open

SyntaxError when testing pootle with runserver command #6918

tasso85 opened this issue Jun 7, 2022 · 1 comment

Comments

@tasso85
Copy link

tasso85 commented Jun 7, 2022

This test is a consequence of #6917, for which I tried installing in a clean environment with MySQL 5.7

Steps to reproduce:

  • install pootle on MySQL 5.7
  • run pootle for quick test with pootle runserver --insecure 0.0.0.0:8000

Results (Expected/Actual):

I would expect Pootle homepage to open, instead I see

A server error occurred.  Please contact the administrator.

The logs of the runserver command says:

Traceback (most recent call last):
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 215, in _get_response
    response = response.render()
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/response.py", line 109, in render
    self.content = self.rendered_content
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/response.py", line 84, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/response.py", line 66, in resolve_template
    return select_template(template, using=self.using)
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/loader.py", line 44, in select_template
    engines = _engine_list(using)
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/loader.py", line 72, in _engine_list
    return engines.all() if using is None else [engines[using]]
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/utils.py", line 89, in all
    return [self[alias] for alias in self]
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/utils.py", line 80, in __getitem__
    engine = engine_cls(params)
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/backends/django.py", line 30, in __init__
    options['libraries'] = self.get_templatetag_libraries(libraries)
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/backends/django.py", line 48, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/backends/django.py", line 113, in get_installed_libraries
    for name in get_package_libraries(pkg):
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/django/template/backends/django.py", line 126, in get_package_libraries
    module = import_module(entry[1])
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/statici18n/templatetags/statici18n.py", line 13, in <module>
    from statici18n.conf import settings
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/statici18n/conf.py", line 3, in <module>
    from appconf import AppConf
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/appconf/__init__.py", line 1, in <module>
    from .base import AppConf  # noqa
  File "/home/mtassinari/pootle/env/lib/python2.7/site-packages/appconf/base.py", line 107
    class AppConf(metaclass=AppConfMetaClass):
                           ^
SyntaxError: invalid syntax

Environment (i.e. 'pootle --version', DB, OS, Browser):

Ubuntu 20.04
Pootle 2.8.2 (Django 1.10.8, Translate Toolkit 2.2.5)
Python 2.7.18
mysql Ver 14.14 Distrib 5.7.38, for Linux (x86_64) using EditLine wrapper

@anoek
Copy link

anoek commented Nov 6, 2023

FTR I worked around this error by downgrading django-appconf to 1.0.2 with pip install django-appconf==1.0.2. This was the last known working version for my setup, I didn't try other versions to find out when it broke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants