question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

distro crashes when non-ASCII character appears in lsb_release

See original GitHub issue

We’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:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
nir0scommented, Nov 22, 2016

Yup. 0.6.0 has the bug. 1.0.1 solves it.

0reactions
tgamblincommented, Nov 22, 2016

@adamjstewart we can probably close this

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found