Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Conversation

@lastmikoi
Copy link

When trying to submit a coverage.xml file, under Python 3.5.0 and using a git-installed codacy-coverage, the following exception is raised:

Traceback (most recent call last):
  File "VENV_PATH/bin/python-codacy-coverage", line 9, in <module>
    load_entry_point('codacy-coverage==1.1.0', 'console_scripts', 'python-codacy-coverage')()
  File "VENV_PATH/lib/python3.5/site-packages/codacy/__init__.py", line 6, in main
    return reporter.run()
  File "VENV_PATH/lib/python3.5/site-packages/codacy/reporter.py", line 140, in run
    upload_report(report, CODACY_PROJECT_TOKEN, args.commit)
  File "VENV_PATH/lib/python3.5/site-packages/codacy/reporter.py", line 110, in upload_report
    message = json.loads(r.content)['success']
  File "/usr/lib64/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

This commit fixes this issue by adding the six library as a dependency and implements a different behaviour if Python3 is being used.

@lastmikoi
Copy link
Author

Mh, it would seems that #7 already deals with this issue in a much smarter way (using Request's Response.text attribute)

Sorry for the noise, closing this issue.

@lastmikoi lastmikoi closed this Nov 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant