Skip to content
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

Error in extracting archive with nested folders #12

Open
ronin1770 opened this issue Apr 19, 2022 · 3 comments
Open

Error in extracting archive with nested folders #12

ronin1770 opened this issue Apr 19, 2022 · 3 comments

Comments

@ronin1770
Copy link

I am trying to extract from an archive that has nested folders. Structure is as follows:

meters
--- 1
------- 1.json
--- 2
------- 2.json
....
....
....

I am getting the following error:

Exception in extraction: [Errno 22] Invalid argument: '.\meters\128\2022-04-09T00:00:00.json'

Code used is as follows:

import xtarfile as tarfile try: with tarfile.open( tmp_folder + f.filename, 'r:gz') as archive: archive.extractall() except Exception as e: print(f"Exception in extraction: {e}") return "Error in extracting meters.tar.gz "

Python version is:

Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

@c-w
Copy link
Member

c-w commented Apr 22, 2022

Could you provide a sample archive binary file that I can use to reproduce this?

@ronin1770
Copy link
Author

ronin1770 commented Apr 24, 2022 via email

@c-w
Copy link
Member

c-w commented Apr 24, 2022

Hm, looks like replying via email and adding attachments doesn’t work. Could you upload it to Google Drive or similar and post a link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants