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

EFS file extraction error, unable to extract zip format #466

Open
2 tasks done
huainie opened this issue Oct 31, 2024 · 6 comments
Open
2 tasks done

EFS file extraction error, unable to extract zip format #466

huainie opened this issue Oct 31, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@huainie
Copy link

huainie commented Oct 31, 2024

Checklist

  • I am using the current master branch
  • I am running on an up-to-date pypsa-usa environment. Update via conda env update -f envs/environment.yaml

The Issue

I was using the command“Snakemake-j1-- configfile config/config.default.yaml” when I found that the EFS file could not be decompressed and wanted to know what to do with it

Steps To Reproduce

No response

Expected Behavior

No response

Error Message

[Thu Oct 31 00:37:18 2024]
Error in rule retrieve_nrel_efs_data:
    jobid: 22
    output: data/nrel_efs/EFSLoadProfile_Reference_Moderate.csv
    log: logs/retrieve/retrieve_efs_Reference_Moderate.log (check log file(s) for error details)

RuleException:
CalledProcessError in file C:\Windows\System32\pypsa-usa\workflow\rules/retrieve.smk, line 71:
Command 'D:/Miniconda/envs/pypsa-usa/python.exe "C:\Windows\System32\pypsa-usa\workflow\.snakemake\scripts\tmpvztggb_a.retrieve_databundles.py"' returned non-zero exit status 1.
  File "C:\Windows\System32\pypsa-usa\workflow\rules/retrieve.smk", line 71, in __rule_retrieve_nrel_efs_data
  File "D:\Miniconda\envs\pypsa-usa\Lib\concurrent\futures\thread.py", line 58, in run
Removing output files of failed job retrieve_nrel_efs_data since they might be corrupted:
data/nrel_efs/EFSLoadProfile_Reference_Moderate.csv
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake\log\2024-10-30T231010.703325.snakemake.log

Anything else?

No response

@huainie huainie added the bug Something isn't working label Oct 31, 2024
@huainie
Copy link
Author

huainie commented Oct 31, 2024

Additional error information: EFSLoadProfile_Reference_Moderate.csv: Unsupported ZIP compression method (9: deflation-64-bit)

@trevorb1
Copy link
Collaborator

Hey @huainie; thanks for reporting! What OS are you using? Windows? If you are on windows, I would suggest running PyPSA-USA via WSL (this is what I do). Im not sure we have any regular developers using Windows, so this may just be a Windows specific bug. Sorry for the hassle!

@ktehranchi
Copy link
Collaborator

ktehranchi commented Oct 31, 2024

@samdotson you found a fix for this on windows correct? Could you share what you did?

@huainie
Copy link
Author

huainie commented Nov 4, 2024

@trevorb1 Yes, I use windows
@ktehranchi Yes, I solved the problem by finding the unzipped part of the code that uses Python's zipfile module to handle all the zipped files instead of relying on the system command tar. The original decompression method could not handle DEFLATE64.

@huainie
Copy link
Author

huainie commented Nov 4, 2024

I replaced the system command tar with Python's zipfile module to handle it

@samgdotson
Copy link

I solved the issue by installing 7 Zip and replacing the tar system command with 7z. Worked like a charm. The only challenge is that it depends on users having 7z installed (which could be added to the instructions). Or I could add a snakemake rule to install check for 7z and install it if not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants