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

Не работает с Django 1.10 #81

Open
shamanis opened this issue Sep 26, 2017 · 2 comments
Open

Не работает с Django 1.10 #81

shamanis opened this issue Sep 26, 2017 · 2 comments

Comments

@shamanis
Copy link

shamanis commented Sep 26, 2017

Django 1.10.8
Django-Select2 5.11.1
Python 3.4.2
Django-fias 1.2.2
django-extensions 1.6.1
При попытке миграции выдает следующее:

Traceback (most recent call last):
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/utils.py", line 65, in __getitem__
    return self._engines[alias]
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/backends/django.py", line 126, in get_package_libraries
    module = import_module(entry[1])
  File "/home/shaman/Work/envs/testProj/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django_select2/templatetags/django_select2_tags.py", line 5, in <module>
    from ..widgets import HeavySelect2Widget, Select2Widget
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django_select2/widgets.py", line 7, in <module>
    from . import util
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django_select2/util.py", line 195, in <module>
    from . import __ENABLE_MULTI_PROCESS_SUPPORT as ENABLE_MULTI_PROCESS_SUPPORT, \
ImportError: cannot import name '__ENABLE_MULTI_PROCESS_SUPPORT'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/management/__init__.py", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/management/base.py", line 294, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/management/base.py", line 342, in execute
    self.check()
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/management/base.py", line 374, in check
    include_deployment_checks=include_deployment_checks,
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks
    issues.extend(super(Command, self)._run_checks(**kwargs))
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/management/base.py", line 361, in _run_checks
    return checks.run_checks(**kwargs)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/core/checks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/admin_tools/checks.py", line 18, in check_admin_tools_configuration
    get_template('admin:admin/base.html')
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/loader.py", line 18, in get_template
    engines = _engine_list(using)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/loader.py", line 72, in _engine_list
    return engines.all() if using is None else [engines[using]]
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/utils.py", line 89, in all
    return [self[alias] for alias in self]
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/utils.py", line 89, in <listcomp>
    return [self[alias] for alias in self]
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/utils.py", line 80, in __getitem__
    engine = engine_cls(params)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/backends/django.py", line 30, in __init__
    options['libraries'] = self.get_templatetag_libraries(libraries)
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/backends/django.py", line 48, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/backends/django.py", line 113, in get_installed_libraries
    for name in get_package_libraries(pkg):
  File "/home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django/template/backends/django.py", line 130, in get_package_libraries
    "trying to load '%s': %s" % (entry[1], e)
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'django_select2.templatetags.django_select2_tags': cannot import name '__ENABLE_MULTI_PROCESS_SUPPORT'
@Yuego
Copy link
Owner

Yuego commented Oct 4, 2017

Судя, по сообщению об ошибке, это проблема django-select2.

В последних версиях django-select2 нет модуля templatetags. Попробуйте удалить django-select2, затем полностью удалите каталог /home/shaman/Work/envs/testProj/lib/python3.4/site-packages/django_select2. И снова установите django-select2.

@Skorpyon
Copy link
Contributor

И поставьте Py3.6

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

3 participants