#1003065 reportbug: crash (exception) on startup with locale de_DE@euro

Package:
python3-apt
Source:
python-apt
Description:
Python 3 interface to libapt-pkg
Submitter:
Adolf Markus Berthold
Date:
2022-01-04 18:48:03 UTC
Severity:
normal
Tags:
#1003065#5
Date:
2022-01-03 15:10:44 UTC
From:
To:
Dear Maintainer,

reportbug (console-version) raises an exception when called with the locale
de_DE@euro :
The above exception was the direct cause of the following exception:

SystemError: <class 'UnicodeDecodeError'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'UnicodeDecodeError'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'UnicodeDecodeError'> returned a result with an error set

The above exception was the direct cause of the following exception:

SystemError: <class 'UnicodeDecodeError'> returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/reportbug", line 44, in <module>
    from reportbug import utils
  File "/usr/lib/python3/dist-packages/reportbug/utils.py", line 109, in <module>
    _apt_cache = apt.Cache()
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 152, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 214, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: <class 'apt_pkg.Cache'> returned a result with an error set
---------8<------------------------------------------------------------

With the C-Locate, it works:
---------8<------------------------------------------------------------
:~$ LANG= reportbug
Please enter the name of the package in which you have found a problem, or type 'other' to report a more general
problem. If you don't know what package the bug is in, please contact debian-user@lists.debian.org for assistance.
reportbug: exiting due to user interrupt.
---------8<------------------------------------------------------------

If the Program is intended not to work without an UTF-8-Locate, it should at least bail out with an error-message
and not raise an exception.



Greetings ... AMB



==========================================

#1003065#10
Date:
2022-01-04 18:45:21 UTC
From:
To:
control: reassign 1003065 python3-apt


Can reproduce on bullseye and sid, using this sequence:

$ python3
'de_DE@euro'

Setting LANG=de_DE@euro is not sufficient to trigger the problem, also
make sure LANGUAGE is not set.