Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

ModuleNotFoundError: No module named 'jinja2' #5431

Closed

Description

@Lrizika

As of #5377, jinja2 is an unconditional import in /rest/client/v2_alpha/account.py, but is still listed under CONDITIONAL_REQUIREMENTS in /python_dependencies.py

As a result, after upgrading with pip3 to 1.0.0, there's a ModuleNotFoundError (presumably, the same would occur on a new install):

~/synapse$ synctl start
Starting ...
Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/site-packages/synapse/app/homeserver.py", line 64, in <module>
    from synapse.rest import ClientRestResource
  File "/usr/local/lib/python3.6/site-packages/synapse/rest/__init__.py", line 32, in <module>
    from synapse.rest.client.v2_alpha import (
  File "/usr/local/lib/python3.6/site-packages/synapse/rest/client/v2_alpha/account.py", line 21, in <module>
    import jinja2
ModuleNotFoundError: No module named 'jinja2'
error starting (exit code: 1); see above for logs

Workaround:

Install jinja2 (pip3 install jinja2).

Activity

  1. 927589452 commented on Jun 12, 2019

    @927589452

    can confirm the bug for fresh installations

  2. richvdh commented on Jun 12, 2019

    @richvdh
    Member

    this should be a quickish fix and is a regression in 1.0

  3. menturion commented on Jun 18, 2019

    @menturion

    I can also confirm this bug for a fresh installation. Please fix this ASAP.

  4. anoadragon453 commented on Jun 21, 2019

    @anoadragon453
    Member

    Fixed in #5514. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    z-bug(Deprecated Label)z-p2(Deprecated Label)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions