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

snakemake not defined in solve_operations_network #1344

Open
2 tasks done
danielelerede-oet opened this issue Oct 2, 2024 · 0 comments
Open
2 tasks done

snakemake not defined in solve_operations_network #1344

danielelerede-oet opened this issue Oct 2, 2024 · 0 comments
Labels

Comments

@danielelerede-oet
Copy link

danielelerede-oet commented Oct 2, 2024

Checklist

  • I am using the current master branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-eur environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

After fixing the usage in solve_operations_network (see #1229) I'm currently experiencing a new problem when running it after the latest changes in pypsa-eur.

Error Message

If applicable, paste any terminal output to help illustrating your problem.
In some cases it may also be useful to share your list of installed packages: conda list.

ERROR:root:Uncaught exception
Traceback (most recent call last):
  File "/home/user/pypsa-eur/.snakemake/shadow/tmpu8288gv1/.snakemake/scripts/tmp7qch8gtt.solve_operations_network.py", line 54, in <module>
    n = solve_network(
        ^^^^^^^^^^^^^^
  File "/home/user/pypsa-eur/rules/../scripts/solve_network.py", line 1026, in solve_network
    status, condition = n.optimize(**kwargs)
                        ^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniforge3/envs/pypsa-eur/lib/python3.12/site-packages/pypsa/optimization/optimize.py", line 615, in __call__
    return optimize(self._parent, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniforge3/envs/pypsa-eur/lib/python3.12/site-packages/pypsa/optimization/optimize.py", line 587, in optimize
    extra_functionality(n, sns)
  File "/home/user/pypsa-eur/rules/../scripts/solve_network.py", line 986, in extra_functionality
    custom_extra_functionality(n, snapshots, snakemake)
                                             ^^^^^^^^^
NameError: name 'snakemake' is not defined
RuleException:
CalledProcessError in file /home/user/pypsa-eur/rules/solve_electricity.smk, line 76:
Command 'set -euo pipefail;  /home/user/miniforge3/envs/pypsa-eur/bin/python3.12 /home/user/pypsa-eur/.snakemake/shadow/tmpu8288gv1/.snakemake/scripts/tmp7qch8gtt.solve_operations_network.py' returned non-zero exit status 1.
[Wed Oct  2 18:11:57 2024]
Error in rule solve_operations_network:
    jobid: 0
    input: results/networks/base_s_20_elec_lv1_3h.nc
    output: results/networks/base_s_20_elec_lv1_3h_op.nc
    log: results/logs/solve_operations_network/base_s_20_elec_lv1_3h_op_solver.log, results/logs/solve_operations_network/base_s_20_elec_lv1_3h_op_python.log (check log file(s) for error details)
    conda-env: /home/user/pypsa-eur/.snakemake/conda/71bc0087c80dec73ac07303ccfc4cbe5_

Exiting because a job execution failed. Look above for error message
WorkflowError:
At least one job did not complete successfully.
[Wed Oct  2 18:11:57 2024]
Error in rule solve_operations_network:
    jobid: 0
    input: results/networks/base_s_20_elec_lv1_3h.nc
    output: results/networks/base_s_20_elec_lv1_3h_op.nc
    log: results/logs/solve_operations_network/base_s_20_elec_lv1_3h_op_solver.log, results/logs/solve_operations_network/base_s_20_elec_lv1_3h_op_python.log (check log file(s) for error details)
    conda-env: /home/user/pypsa-eur/.snakemake/conda/71bc0087c80dec73ac07303ccfc4cbe5_

Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2024-10-02T180621.360596.snakemake.log
WorkflowError:
At least one job did not complete successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant