meeshkan / hmt

HTTP Mocking Toolkit
MIT License
52 stars 7 forks source link

ModuleNotFoundError: No module named 'jsonpath_rw' #192

Closed espoirMur closed 4 years ago

espoirMur commented 4 years ago

I just set up the project and I am trying to run the tests, but I am getting this error.

When I run pytest

ImportError while loading conftest '/Users/es.py/Projects/Personal/meeshkan/tests/conftest.py'.
tests/conftest.py:10: in <module>
    from meeshkan.serve.mock.request_processor import RequestProcessor
meeshkan/serve/mock/request_processor.py:10: in <module>
    from meeshkan.serve.mock.faker.stateful_faker import StatefulFaker
meeshkan/serve/mock/faker/stateful_faker.py:8: in <module>
    from meeshkan.serve.mock.storage.entity import Entity
meeshkan/serve/mock/storage/entity.py:12: in <module>
    from jsonpath_rw import Fields, parse
E   ModuleNotFoundError: No module named 'jsonpath_rw'

I am sure it's not related to my module because when I check if it exists I get this....

Screen Shot 2020-04-18 at 22 06 36
aby2s commented 4 years ago

Thank you for your report!

I may suggest that the pytest command refers to a system-wide Python instead of a venv. You may check it by running whereis pytest.

If my suggestion is right, you could try running it as python -m pytest.

If that doesn't help, please, send your OS version, Python version, steps to reproduce, i.e. commands you run to create a venv and launch tests, and full logs. I can't reproduce it on my local environment. So I'll probably need all of that to understand what's wrong.

espoirMur commented 4 years ago

Good, I will do it later today... Thanks for your quick response!

espoirMur commented 4 years ago

@aby2s, Thanks I manage to make it run...

python -m pytest .

Did the trick...