You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project has source code that contains utf-8 (some of my tests are checking if my code works with weird inputs). My tests run fine and the python coverage tool also works fine, but coveralls crashes when processing it: see https://travis-ci.org/chmduquesne/ok/builds/43104434.
I am attaching the traceback:
$ coveralls
Submitting coverage to coveralls.io...
Traceback (most recent call last):
File "/usr/local/bin/coveralls", line 9, in <module>
load_entry_point('coveralls==0.4.4', 'console_scripts', 'coveralls')()
File "/usr/local/lib/python2.7/dist-packages/coveralls/cli.py", line 49, in main
result = coverallz.wear()
File "/usr/local/lib/python2.7/dist-packages/coveralls/api.py", line 73, in wear
data = self.create_data()
File "/usr/local/lib/python2.7/dist-packages/coveralls/api.py", line 122, in create_data
self._data = {'source_files': self.get_coverage()}
File "/usr/local/lib/python2.7/dist-packages/coveralls/api.py", line 132, in get_coverage
return reporter.report()
File "/usr/local/lib/python2.7/dist-packages/coveralls/reporter.py", line 27, in report
self.parse_file(cu, self.coverage._analyze(cu))
File "/usr/local/lib/python2.7/dist-packages/coveralls/reporter.py", line 64, in parse_file
source = source.decode(encoding).encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1: ordinal not in range(128)
The text was updated successfully, but these errors were encountered:
I see you've fixed a problem with malformed encoding declaration: chmduquesne/ok@bdbf3f6
Thanks for reporting this problem
coagulant
changed the title
coveralls crashes when dealing with utf-8 source code
coveralls crashes when dealing with malformed encoding declaration
Jan 5, 2015
Yes. My keyboard sometimes puts this weird white character instead of a
space, which apparently is not cool when you are declaring the encoding.
Python does not complain, but it makes coverage unhappy, as well as
coveralls. Sorry, I forgot to tell you that I fixed my code.
On Jan 5, 2015 6:04 PM, "Ilya Baryshev" notifications@github.com wrote:
My project has source code that contains utf-8 (some of my tests are checking if my code works with weird inputs). My tests run fine and the python coverage tool also works fine, but coveralls crashes when processing it: see https://travis-ci.org/chmduquesne/ok/builds/43104434.
I am attaching the traceback:
The text was updated successfully, but these errors were encountered: