Closed iainlane closed 8 years ago
Will fix this when I'm home - for some reason, Python3 is unable to read the bz2 files (tested on Xenial) - I get Data corruption errors, but the file magic number and CRC checksums are fine (tested with the bzip2 command-line utility).
This needs some further investigation - and might be the issue here, since the Translation file must have a Package
field per section.
Actually when it 'works' I still see no sections - I put a print inside the loop and it never executes. So doesn't crash but also does nothing. :)
Add a print(l10n_file.read(512)
statement and observe a failing bz2 decompressor... (Not sure what is going on there...)
TagFile swallows that error and is just empty in that case, which should cause no harm. I wonder why you are seeing that crash described above.
print(read())
works for me but still the TagFile is bad
decompressing it manually works, doing this in memory (read
+ BytesIO
) not - TagFile
can't take a BytesIO
it seems
Jup, TagFile need a filename or an open file object as parameter. Interesting that reading the bz2 file works for you... Failed for me when I tried this on Xenial yesterday.
This is fixed now, at least partially - the bz2 reading error remains.
This works on current python-apt but not trusty's - seen on Debian and Ubuntu