Bug#1064973: diffoscope fails with struct.error: unpack requires a buffer of 4 bytes

Chris Lamb chris at reproducible-builds.org
Fri Mar 1 14:06:22 GMT 2024


Zbigniew Jędrzejewski-Szmek wrote:

>   File 
> "/usr/lib/python3.12/site-packages/diffoscope/comparators/python.py", 
> line 74, in parse_pyc
>     modtime = time.asctime(time.gmtime(struct.unpack("<L", moddate)[0]))
>                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> struct.error: unpack requires a buffer of 4 bytes

I'm trying to track this down further so I can fix the underlying
problem. However, I'm having difficulty reproducing locally. In the
first instance, it would be helpful to know exactly which file within
the .rpm is the one (previously) causing the traceback.

Can you run diffoscope --debug so we can see which .pyc file is the
offending one? I think it is "environment.cpython-312.pyc", but it
would be great to get confirmation. Also knowing your exact Python
version (using python3 --version) would be useful withal.


Best wishes,

-- 
      o
    ⬋   ⬊      Chris Lamb
   o     o     reproducible-builds.org 💠
    ⬊   ⬋
      o



More information about the Reproducible-builds mailing list