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

liveries_scanner: "zipfile.BadZipFile: File is not a zip file" #287

Open
spencershepard opened this issue Feb 12, 2023 · 9 comments
Open

Comments

@spencershepard
Copy link
Contributor

File "dcs\helicopters.py", line 28, in Mi_24V
File "dcs\liveries_scanner.py", line 167, in init
File "dcs\liveries_scanner.py", line 197, in initialize
File "dcs\liveries_scanner.py", line 363, in scan_dcs_installation
File "dcs\liveries_scanner.py", line 328, in scan_mods_path
File "dcs\liveries_scanner.py", line 314, in scan_liveries
File "dcs\liveries_scanner.py", line 269, in scan_zip_file
File "zipfile.py", line 1267, in init
File "zipfile.py", line 1334, in _RealGetContents
zipfile.BadZipFile: File is not a zip file
error.txt

User reports they have a similar error with both RotorOps and Liberation

@spencershepard
Copy link
Contributor Author

I'll get more details from the user on their installed mods and directory structure.

@spencershepard
Copy link
Contributor Author

tree.txt

@Raffson
Copy link
Contributor

Raffson commented Feb 12, 2023

It's because of a mod, that's clear from the stack trace. And it also indicates it's a zipfile that's causing the issue.

@spencershepard
Copy link
Contributor Author

@Raffson agreed it looks like it's because of a mod. Perhaps we could display the name of bad file or handle the exception. I've seen two reports from users on my end. I'll post if we can nail it down to any particular mod.

@Raffson
Copy link
Contributor

Raffson commented Feb 12, 2023

@Raffson agreed it looks like it's because of a mod. Perhaps we could display the name of bad file or handle the exception. I've seen two reports from users on my end. I'll post if we can nail it down to any particular mod.

Just took a quick glance at the code and it seems I've misinterpreted/forgot what scan_mods_path does, but the comments suggest it can also be in the installation folder. The fact that I can't seem to find a modded livery as a zip file in tree.txt, suggests it's not a mod after all. I'll try reproducing locally after dinner...

@Raffson
Copy link
Contributor

Raffson commented Feb 12, 2023

@spencershepard Do your users have a modded installation? Trace suggests it's in CoreMods/aircraft where a zip file (or at least a file containing '.zip') is causing the issue.

@spencershepard
Copy link
Contributor Author

@Raffson I asked and this is what I got back for a search for zip files in coremods folder. image-1.png

@Raffson
Copy link
Contributor

Raffson commented Feb 12, 2023

@spencershepard Could you ask your users to narrow it down to 'CoreMods/aircraft/*/Liveries'?

@spencershepard
Copy link
Contributor Author

@Raffson done. Also for your interest this is where the discussion is: https://discord.gg/pKcbmxeB

Raffson added a commit to dcs-retribution/pydcs that referenced this issue Feb 12, 2023
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