New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tarfile exception on large .tar files #39400
Comments
The following exception is thrown when I write a lot of Traceback (most recent call last):
File "/usr/local/metroField/fieldPlugins/Backup.py", line
184, in run
self._doBackup()
File "/usr/local/metroField/fieldPlugins/Backup.py", line
333, in _doBackup
arc.close()
File "/usr/local/metroField/fieldPlugins/Backup.py", line
533, in close
self.tf.close()
File "/usr/local/lib/python2.3/tarfile.py", line 1009, in
close
self.fileobj.close()
File "/usr/local/lib/python2.3/tarfile.py", line 360, in
close
self.fileobj.write(struct.pack("<L", self.pos))
OverflowError: long int too large to convert |
Logged In: YES Hi, I think I've found the correct solution to the problem 358: if self.type == "gz": 359: self.fileobj.write(struct.pack("<l", self.crc)) 360: self.fileobj.write(struct.pack("<L", self.pos)) ...shows that this error only occurs when using .gz extensions. According to the gzip file format spec from www.wotsit.org, 358: if self.type == "gz": 359: self.fileobj.write(struct.pack("<l", self.crc)) 360: self.fileobj.write(struct.pack("<L", self.pos % 2**32) I also noted that in Jython 2.1 struct.pack('<L', sys. ...johahn |
Logged In: YES Thanks for reporting this bug; your suggested change seems to be correct. The Jython bug should be reported to whatever bug tracker the Jython |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: