[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-11-29 Thread Andrei Kulakov
Andrei Kulakov added the comment: Closing by request of OP. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-23 Thread Xiaolong Liu
Xiaolong Liu added the comment: Andrei: No multiprocessing or multithreading was used when creating the zip file. -- ___ Python tracker ___ __

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-23 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: Thanks for the report! By the way on re-reading my message, of course by opening and closing archive on each file using the `with` block, you take care of the first issue I mentioned (although it's not very efficient). And I assume there was no multipr

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-23 Thread Xiaolong Liu
Xiaolong Liu added the comment: Andrei: Never mind. Yes. It is hardly impossible to sort out a problem when it cannot be reproduced. Just close it plz. Anyway, many thanks for your suggestions. -- ___ Python tracker

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-23 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: apologies for the confusion, I missed that when coming back to the thread for the 2nd time. I took a look at the code and one potential issue I see is that you are opening the file in 'w' mode if stat size is 0 (or if file isn't valid), and in 'a' mode

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-23 Thread Xiaolong Liu
Xiaolong Liu added the comment: It seems the indents were automatically removed in the message box. I shared the code snippet formmated here: https://www.online-python.com/cDojvl2CMS -- ___ Python tracker

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-23 Thread Xiaolong Liu
Xiaolong Liu added the comment: Serhiy: Thanks for your explanation. The file was created by zipfile module. I used the script hundreds of times, while only once (the uploaded zipped file) was abnormal. Since the project ended a long time ago, I cannot reproduce the error right now. I wil

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the zipped file was created by zipfile module of Python, it is a bug. Could you reproduce the sequence of actions that creates such broken archive? -- ___ Python tracker _

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a bug in archivers, it is just a broken archive. The ZIP archive contains a central directory which lists all files in the archive, so the archiver can just read the central directory without reading all archive to get the list of files. There ar

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Xiaolong Liu
Xiaolong Liu added the comment: Andrei: The zipped file was created by zipfile module of Python. That's the reason I posted it here. I achived more than 2000 files to the abnormal zipped file. And no tool can extract whole files archived within. 7zip got the first part, and other tools g

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: builtin MacOS archive tool also reports 674. since Google archiver, and built-in tools on all major platforms report 674 files; it looks like 7zip might be the outlier here [note also that 7zip have their own format]. Unless it can be shown that Pyth

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Xiaolong Liu
Xiaolong Liu added the comment: Andrei: Exactly, different extraction tool gave different results. File no.tool platform 674the built-in tool on Win10win10 674winrarwin10 13997zipwin10 1399360zipwin10 674

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: also please delete the quoted text when replying via email, otherwise it's hard to read on the issue page; much thanks! -- ___ Python tracker _

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-22 Thread Andrei Kulakov
Andrei Kulakov added the comment: Liu: Thanks! Google zip also shows 674 files in this archive, so it appears that it's not a Python-only issue. Can you test it with a few zip programs, ideally on a 2 or more platforms, and check which of them report more than 674 files? (I simply opened th

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-16 Thread Xiaolong Liu
49 To: liuxiaolong125 Subject: [issue41102] ZipFile.namelist() does not match the actual files in .zip file Andrei Kulakov added the comment: Xiaolong: The file no longer exists on the google drive. How big was the file? -- nosy: +andrei.avk ___ Python tr

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2021-08-14 Thread Andrei Kulakov
Andrei Kulakov added the comment: Xiaolong: The file no longer exists on the google drive. How big was the file? -- nosy: +andrei.avk ___ Python tracker ___ __

[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2020-06-24 Thread Xiaolong Liu
New submission from Xiaolong Liu : I used zipfile module to archive thousands of .geojson file to zip files and access those .geojson file by ZipFile.open() method. In my hundreds of runnings, one of them was abnormal. As the title says, the ZipFile.namelist() did not match all the files in .z