Version Checks (indicate both or one)
The Issue
Snakemake v8+ changes the way the directory is cached. This causes error messages related to any local imports of the PyPSA-USA scripts directory. This can be fixed 2 ways:
-
Temp fix: import the directory path to the system $PYTHONPATH in the terminal: export PYTHONPATH="/scratch/htc/oet/044_kinetics/pypsa-usa/workflow/scripts:$PYTHONPATH"
-
Permanent fix: add the directory path during script execution sys.path.insert(0, os.path.dirname(__file__)) in each affected file
Steps To Reproduce
No response
Error Message
Anything else?
No response
Version Checks (indicate both or one)
This bug exists on the master branch of PyPSA-USA.
This bug exists on the develop branch of PyPSA-USA.
The Issue
Snakemake v8+ changes the way the directory is cached. This causes error messages related to any local imports of the PyPSA-USA scripts directory. This can be fixed 2 ways:
Temp fix: import the directory path to the system $PYTHONPATH in the terminal:
export PYTHONPATH="/scratch/htc/oet/044_kinetics/pypsa-usa/workflow/scripts:$PYTHONPATH"Permanent fix: add the directory path during script execution
sys.path.insert(0, os.path.dirname(__file__))in each affected fileSteps To Reproduce
No response
Error Message
Anything else?
No response