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

coveralls is not working for python 3.5 or 3.8 #347

Closed
jmilloy opened this issue Dec 14, 2019 · 6 comments
Closed

coveralls is not working for python 3.5 or 3.8 #347

jmilloy opened this issue Dec 14, 2019 · 6 comments
Labels

Comments

@jmilloy
Copy link
Collaborator

jmilloy commented Dec 14, 2019

The 3.5 and 3.8 jobs on TravisCI are failing because of the following error running coveralls:

$ coveralls
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.5.6/bin/coveralls", line 7, in <module>
    from coveralls.cli import main
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/__init__.py", line 2, in <module>
    from .api import Coveralls
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/api.py", line 13, in <module>
    from .reporter import CoverallReporter
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/coveralls/reporter.py", line 10, in <module>
    from coverage.report import Reporter
ImportError: cannot import name 'Reporter'
The command "coveralls" exited with 1.

The error is the same in the python3.8 job.

Locally, I can from coverage.report import Reporter just fine in both python3.5 and python3.8 environments, so I'm not sure what's going on or how to really debug it.

@jmilloy jmilloy mentioned this issue Dec 14, 2019
3 tasks
@bannsec
Copy link

bannsec commented Dec 22, 2019

My tests are failing with this error with Python 3.6 as well.

@mpu-creare
Copy link
Contributor

Seems related to this: z4r/python-coveralls#73

@mpu-creare
Copy link
Contributor

Seems like the 3.6 env is using coverage 5.0, while the passing 3.7 env is using coverage 4.x.x

@jmilloy
Copy link
Collaborator Author

jmilloy commented Dec 30, 2019

These guys pin the coverage module in the travel config

script
 - pip install coverage==4.5.4
 ...

Maybe there is something like this that we can do, or similarly maybe we can pin the coveralls version in our setup.py?

@jmilloy
Copy link
Collaborator Author

jmilloy commented Dec 31, 2019

Okay, pinning coverage worked. See 0a7ba0b

@amykyta3
Copy link

Commenting here since this thread shows up in Google searches often.

There's no need to pin to an older version of coveralls.
Instead, make sure you are not installing coverage or python-coveralls as they seem to cause some sort of conflict (See: z4r/python-coveralls#73).

This combination is working for me:

pip install -U pytest pytest-cov coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants