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

chktexbear fails to run #317

Closed
sils opened this issue Apr 5, 2016 · 7 comments
Closed

chktexbear fails to run #317

sils opened this issue Apr 5, 2016 · 7 comments
Assignees

Comments

@sils
Copy link
Member

sils commented Apr 5, 2016

Running py.test -k Latex on archlinux with chktex v1.7.4 yields:

E           Bear LatexLintBear failed to run. Take a look at debug messages for further information.
E           The bear LatexLintBear raised an exception. If you are the writer of this bear, please make sure to catch all exceptions. If not and this error annoys you, you might want to get in contact with the writer of this bear.
E           
E           Traceback information is provided below:
E           
E           Traceback (most recent call last):
E             File "/usr/lib/python3.5/site-packages/coala-0.6.0.dev99999999999999-py3.5.egg/coalib/bears/Bear.py", line 97, in execute
E               return list(self.run_bear_from_section(args, kwargs) or [])
E             File "/usr/lib/python3.5/site-packages/coala-0.6.0.dev99999999999999-py3.5.egg/coalib/bears/Bear.py", line 90, in run_bear_from_section
E               return self.run(*args, **kwargs)
E             File "/home/lasse/prog/coala-bears/bears/latex/LatexLintBear.py", line 21, in run
E               return self.lint(filename)
E             File "/usr/lib/python3.5/site-packages/coala-0.6.0.dev99999999999999-py3.5.egg/coalib/bearlib/abstractions/Lint.py", line 96, in lint
E               stdin=stdin_input)
E             File "/usr/lib/python3.5/site-packages/coala-0.6.0.dev99999999999999-py3.5.egg/coalib/misc/Shell.py", line 56, in run_shell_command
E               ret = p.communicate(stdin)
E             File "/usr/lib/python3.5/subprocess.py", line 1068, in communicate
E               stdout, stderr = self._communicate(input, endtime, timeout)
E             File "/usr/lib/python3.5/subprocess.py", line 1741, in _communicate
E               self.stdout.encoding)
E             File "/usr/lib/python3.5/subprocess.py", line 979, in _translate_newlines
E               data = data.decode(encoding)
E           UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 115: invalid continuation byte
E           Command: chktex "/tmp/tmpv4hcm0gy"

Can somebody reproduce?

@sils sils added the type/bug label Apr 5, 2016
@gitmate-bot
Copy link
Collaborator

Thanks for reporting this issue!

Your aid is required, fellow coalaian. Help us triage and solving this issue!

CC @sils1297, @AbdealiJK

@AbdealiLoKo
Copy link
Contributor

/newI can reproduce this. But for some reason it doesn't fail on circleci. Probably an issue with the locale/stdout encoding being detected.
But, irrespective, this is an upstream bug, as chktex does give a non-unicode output.
Filed it at https://savannah.nongnu.org/bugs/index.php?49000

@jayvdb
Copy link
Member

jayvdb commented Oct 11, 2016

A more complete analysis is at #889 ; essentially it is chktex 1.7.3-5 , and is now fixed.
And Circle CI precise images dont encounter this because they are 1.7.2.

@jayvdb
Copy link
Member

jayvdb commented Oct 11, 2016

I'm not sure how big this bug is. It looks quite bad ; maybe these releases should be blacklisted.
Or maybe it is possible to turn off displaying the source on all recent versions, which may help.

@jayvdb
Copy link
Member

jayvdb commented Oct 11, 2016

Ok, it is easy enough to avoid the source line which appears to be the only problem, and it wasnt being used anyway.
Using chktex --format='%k %n in %f %l: %m^M^L' ~/tmp/bad.tex does the trick.

jayvdb added a commit to jayvdb/coala-bears that referenced this issue Oct 11, 2016
@jayvdb jayvdb self-assigned this Oct 11, 2016
@jayvdb
Copy link
Member

jayvdb commented Oct 11, 2016

I've posted more info at https://savannah.nongnu.org/bugs/?49000#comment2 , and cc'd the Debian package maintainer in the hope that they push out a new version, ideally as a security update.

jayvdb added a commit to jayvdb/coala-bears that referenced this issue Oct 11, 2016
chktex 1.7.3-1.7.5 emits garbage output for the
filename and source line output.
This is reported at:
https://savannah.nongnu.org/bugs/?49000

To avoid this bug, the filename and source line
need to be excluded from the output using --format.

Fixes coala#317
jayvdb added a commit to jayvdb/coala-bears that referenced this issue Oct 11, 2016
chktex 1.7.3-1.7.5 emits garbage output for the
filename and source line output.
This is reported at:
https://savannah.nongnu.org/bugs/?49000

To avoid this bug, the filename and source line
need to be excluded from the output using --format.

Fixes coala#317
@jayvdb
Copy link
Member

jayvdb commented Oct 11, 2016

btw, the resource I used for --format string was https://www.nongnu.org/chktex/ChkTeX.pdf . I didnt see it documented in the --help anywhere.

@rultor rultor closed this as completed in 622637e Oct 13, 2016
gosom pushed a commit to gosom/coala-bears that referenced this issue Jul 15, 2017
chktex 1.7.3-1.7.5 emits garbage output for the
filename and source line output.
This is reported at:
https://savannah.nongnu.org/bugs/?49000

To avoid this bug, the filename and source line
need to be excluded from the output using --format.

Fixes coala#317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants