Your message dated Mon, 6 Oct 2014 13:57:29 +0200 with message-id <cae6_+uepvqwg4cib4m0k69ftbcxn5bwb1yazshfcoed3fus...@mail.gmail.com> and subject line has caused the Debian Bug report #564550, regarding python-mutagen: warning when saving ogg vorbis files to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 564550: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564550 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: python-mutagen Version: 1.14-2 Severity: normal I'm getting this message when saving (some) Ogg Vorbis files: /usr/lib/python2.5/site-packages/mutagen/_util.py:149: DeprecationWarning: 'i' format requires -2147483648 <= number <= 2147483647 to_int_be = staticmethod(lambda data: struct.pack('>i', data)) I first noticed this warning when I wrote a program, using mutagen, to update the tags of several Vorbis files. As my program attempted to save the modified files, this warning would sometimes spring up. I've since noticed that exfalso (which also relies on mutagen) occasionally triggers this warning, too, when you click "Save" after having modified a Vorbis file's tags. This warning seems to be the only symptom: the files in question are successfully saved; they play and display correctly thereafter; and future tag modifications don't necessarily cause the warning to resurface. Traceback (most recent call last): File "/home/lg/fanta.py", line 87, in <module> file.save() File "/usr/lib/python2.5/site-packages/mutagen/ogg.py", line 492, in save try: self.tags._inject(fileobj) File "/usr/lib/python2.5/site-packages/mutagen/oggvorbis.py", line 101, in _inject OggPage.replace(fileobj, old_pages, new_pages) File "/usr/lib/python2.5/site-packages/mutagen/ogg.py", line 351, in replace new_data = "".join(map(klass.write, new_pages)) File "/usr/lib/python2.5/site-packages/mutagen/ogg.py", line 153, in write crc = cdata.to_int_be(crc).translate(cdata.bitswap) File "/usr/lib/python2.5/site-packages/mutagen/_util.py", line 149, in <lambda> to_int_be = staticmethod(lambda data: struct.pack('>i', data)) File "/usr/lib/python2.5/struct.py", line 63, in pack return o.pack(*args) File "/usr/lib/python2.5/warnings.py", line 62, in warn globals) File "/usr/lib/python2.5/warnings.py", line 102, in warn_explicit raise message DeprecationWarning: 'i' format requires -2147483648 <= number <= 2147483647 I can't reliably reproduce the problem. But by modifying ogg.py, I was able to examine the values passed to 'to_int_be' and, sure enough, sometimes the 'crc' variable is less than -2147483648. Here's the relevant piece of ogg.py: # Python's CRC is swapped relative to Ogg's needs. crc = ~zlib.crc32(data.translate(cdata.bitswap), -1) # Although we're using to_int_be, this actually makes the CRC # a proper le integer, since Python's CRC is byteswapped. crc = cdata.to_int_be(crc).translate(cdata.bitswap) data = data[:22] + crc + data[26:] return data On my machine, the wordsize is 64 bits and sys.maxint is appropriately large. When Python takes the bitwise complement, it's treating what should be a 32-bit CRC like an ordinary, full-size integer -- and yet struct.pack is expecting at most a 32-bit number. I can fix the problem on my machine by turning off everything above the 32nd bit and treating the checksum as an unsigned int. For example, crc = cdata.to_int_be(crc).translate(cdata.bitswap) would become crc = cdata.to_uint_be(crc & 0xFFFFFFFF).translate(cdata.bitswap) With that change, I no longer see the warning. Whether it's the best way to fix the problem for everyone, I don't know! -- System Information: Debian Release: 5.0.3 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages python-mutagen depends on: ii python 2.5.2-3 An interactive high-level object-o ii python-central 0.6.8 register and build utility for Pyt python-mutagen recommends no packages. python-mutagen suggests no packages. -- no debconf information
--- End Message ---
--- Begin Message ---Version: 1.21-1 https://code.google.com/p/mutagen/issues/detail?id=63
--- End Message ---

