python3-qrencode fails with SystemError about PY_SSIZE_T_CLEAN macro

Bug #2056340 reported by Arrigo Marchiori
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QR Tools
Invalid
Undecided
Unassigned

Bug Description

Python3 module qrencode does not allow generating QR codes using function encode().

The attached very simple script dies as follows:

$ ./python3-qrencode.py
Traceback (most recent call last):
  File "/home/arrigo/temp/./python3-qrencode.py", line 5, in <module>
    qrencode.encode("Hello world")
  File "/usr/lib/python3/dist-packages/qrencode/__init__.py", line 47, in encode
    version, size, data = _encode(data, version, level, hint, True)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

Revision history for this message
Arrigo Marchiori (ardovm) wrote :
Revision history for this message
Arrigo Marchiori (ardovm) wrote :

Pagage: python3-qrencode version 1.2-5build6, architecture amd64 on Ubuntu 22.04

Revision history for this message
Ramiro Algozino (algozino) wrote :

Hi Arrigo,

"qrencode" is not provided by QR Tools. It is a different package.

If you want to use QR Tools, you should use something like this:

import qrtools
qr = qrtools.QR("hello world")

Otherwise, please open the issue to the python3-qrencode launchpad instead.

Regards

Changed in qr-tools:
status: New → Invalid
Revision history for this message
Arrigo Marchiori (ardovm) wrote :

Hello Ramiro,

thank you for pointing me in the right direction.

Bug reported here: https://bugs.launchpad.net/ubuntu/+source/python-qrencode/+bug/2056361

Best regards.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.