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

Pytest Failing on Fresh Clone #77

Closed
KavanMally opened this issue Jan 11, 2020 · 2 comments
Closed

Pytest Failing on Fresh Clone #77

KavanMally opened this issue Jan 11, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@KavanMally
Copy link

KavanMally commented Jan 11, 2020

I am trying to run pytest on a fresh clone of the main repo. Following instructions from the main documentation, I cloned a new copy of the repository, created a pipenv, synced it, and ran a sample spider. Running 'pytest' in bash will give the following traceback.

Traceback (most recent call last): File "/home/kavan/.local/share/virtualenvs/city-scrapers-pitt-vm2XhXX5/bin/pytest", line 5, in <module> from pytest import main File "/home/kavan/.local/share/virtualenvs/city-scrapers-pitt-vm2XhXX5/lib/python3.5/site-packages/pytest/__init__.py", line 6, in <module> from _pytest.assertion import register_assert_rewrite File "/home/kavan/.local/share/virtualenvs/city-scrapers-pitt-vm2XhXX5/lib/python3.5/site-packages/_pytest/assertion/__init__.py", line 7, in <module> from _pytest.assertion import rewrite File "/home/kavan/.local/share/virtualenvs/city-scrapers-pitt-vm2XhXX5/lib/python3.5/site-packages/_pytest/assertion/rewrite.py", line 29, in <module> from _pytest.pathlib import fnmatch_ex File "/home/kavan/.local/share/virtualenvs/city-scrapers-pitt-vm2XhXX5/lib/python3.5/site-packages/_pytest/pathlib.py", line 26, in <module> from pathlib2 import Path, PurePath ImportError: No module named 'pathlib2'

Specs:
Linux Mint 18.3 (Virtual Machine)
Python: 3.5.2
Pip (pipenv): 19.3.1

@bonfirefan bonfirefan added the bug Something isn't working label Jan 24, 2020
@ben-nathanson
Copy link

Hey @KavanMally -- just wanted to touch base and see if you made any progress with this bug or had a chance to recreate it on another machine. Thank you for posting this bug!

I'm sorry to say I haven't been able to find much on this specific error + OS combination but I will add this into our documentation. The dependencies for this project should run on Linux, especially a common distro like Linux Mint, but I have seen many issues like this.

Thanks,
--Ben

@bonfirefan
Copy link
Collaborator

Hey @KavanMally - your issue should be resolved with the merge for #81
We added a requirement for pathlib, which is needed for python 3.5 in the pipfile:
pathlib2 = {version = "*",python_version = "< '3.6'"}
Make sure to sync your fork and run pipenv install again - hopefully that should fix the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants