distro crashes when non-ASCII character appears in lsb_release
See original GitHub issueWe’re using the distro
package for linux distribution detection in a package manager called Spack. Unfortunately, one of our users discovered a bug that causes distro to crash with the following error message:
File "distro.py", line 1049, in
_distroi = LinuxDistribution()
File "distro.py", line 595, in init
if include_lsb else {}
File "distro.py", line 921, in _lsb_release_info
out, err = out.decode('ascii'), err.decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 250: ordinal not in range(128)
Here is their lsb_release:
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 19 (Schrödinger’s Cat)
Release: 19
Codename: Schrödinger’sCat
I assume the problem is that distro
can’t handle the ö
in Schrödinger’s Cat.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Pip crashes on non-ASCII symbol in lsb_release output #4062
Pip version: 9.0.0 Python version: CPython 3.5.2 Operating System: Fedora ... Pip crashes on non-ASCII symbol in lsb_release output #4062.
Read more >Server crash with ascii NUL characters in syslog ( ^@^@^@... )
BUT, problem is, this night, this happened to another server. Same crash, same caracters in the syslog, no explanation. Does anybody have any ......
Read more >tcsh 6.20.00-7 crashes when entering non-ascii characters
Package: tcsh Version: version 6.20.00-7 Description: tcsh crashes with a core dump when entering non-ascii characters on the command line, ...
Read more >Bug #123543 for Tk: Tk crashes with high unicode characters
Hi, Tk raises a fatal exception when handed a (very) high unicode character. Here is a test script demonstrating the issue: ...
Read more >verify-signature crashes on non ascii characters
Bzr crashes when verifying non-ascii characters in signatures, in verbose mode. Testcase: bzr branch lp:~xnox/+junk/test-signatures
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup. 0.6.0 has the bug. 1.0.1 solves it.
@adamjstewart we can probably close this