Package: audiotools
Version: 3.1.1-1.1+b12
Severity: normal
X-Debbugs-Cc: tho...@intevation.de

Dear Maintainer,

using tracktag to change attributes of (at least) flac or mp3 files
fails since upgrading from Debian bullseye to Debian bookworm:

$ tracktag --name=Test test.flac
Traceback (most recent call last):
  File "/usr/bin/tracktag", line 526, in <module>
    track.update_metadata(old_metadata)
  File "/usr/lib/python3/dist-packages/audiotools/flac.py", line 1650, in 
update_metadata
    writer.write_bytes(b'fLaC')
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
*** Warning: Error occurred trying to flush stream during dealloc

$ tracktag --name=Test test.mp3
Traceback (most recent call last):
  File "/usr/bin/tracktag", line 369, in <module>
    tracks = audiotools.open_files(options.filenames,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/audiotools/__init__.py", line 1969, in 
open_files
    audio_class = file_type(f)
                  ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/audiotools/__init__.py", line 1740, in 
file_type
    for b in parse("1p 7u" * 4, False, header[6:10]):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats


The same error happens with changing other attributes as well, e.g.
using --track-total=12, or when using interactive mode (tracktag -I)

Background for this:
https://github.com/python/cpython/issues/85115
PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN 
is not defined

I've found a fix/workaround for another audio-related python program:
https://git.skeh.site/skeh/pyaudio/commit/2ee560056ec889ea7cd3ce1801b796b0939dd540
with the relevant parts of the patch being:

  +#define PY_SSIZE_T_CLEAN
  ...
  -  unsigned output_len;
  +  Py_ssize_t output_len;

I haven't checked if something like this would work in audiotools or if
there is a better solution.

Best regards,
Thomas Arendsen Hein


-- System Information:
Debian Release: 12.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-13-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages audiotools depends on:
ii  libasound2         1.2.8-1+b1
ii  libc6              2.36-9+deb12u3
ii  libcdio-cdda2      10.2+2.0.1-dmo1
ii  libcdio-paranoia2  10.2+2.0.1-dmo1
ii  libcdio19          1:2.1.0-dmo3
ii  libmp3lame0        1:3.100-dmo2
ii  libmpg123-0        1.31.2-1
ii  libopus0           1.3.1-3
ii  libopusfile0       0.12-4
ii  libpulse0          16.1+dfsg1-2+b1
ii  libtwolame0        1:0.4.0-dmo2
ii  libvorbisenc2      1.3.7-1
ii  libvorbisfile3     1.3.7-1
ii  libwavpack1        5.6.0-1
ii  python3            3.11.2-1+b1

Versions of packages audiotools recommends:
ii  faad           2.10.1-1
ii  python3-urwid  2.1.2-4+b1

Versions of packages audiotools suggests:
pn  faac  <none>

-- no debconf information

Reply via email to