Skip to content

Error when running pipenv run pytest #13

@marktani

Description

@marktani

Following the instructions from README, when running pipenv run pytest this is my output:

ImportError while importing test module '/Users/nilan/projects/cdli-cts-server/test_app.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test_app.py:4: in <module>
    import main
main.py:11: in <module>
    from capitains_nautilus.cts.resolver import NautilusCTSResolver
../../.local/share/virtualenvs/cdli-cts-server-9o7IsoQ-/lib/python3.9/site-packages/capitains_nautilus/cts/resolver.py:4: in <module>
    from werkzeug.contrib.cache import NullCache
E   ModuleNotFoundError: No module named 'werkzeug.contrib'

It looks like werkzeug.contrib has been removed in some versions after 0.16.0 (see here for example), so the proposed solution is this:

pip uninstall werkzeug
pip install werkzeug==0.16.0

resulting in the following error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 2.2.3 requires Werkzeug>=2.2.2, but you have werkzeug 0.16.0 which is incompatible.

Ok, so we also need to adjust flask to an older version.

I continued to dig for some versions that work well with each other and this example, but I have had no luck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions