Error in Snakefile while running the PyPSA-EUR first tutorial

54 Views Asked by At

I have seen another post in this regard, but I assume there is a lack of context so I will try to explain in more detail here to see if anyone can help or has experienced the same issue and managed to overcome it.

I have followed the installation steps as described in the documentation. Cloning the repository and creating a new environment with the "environment.yaml" file in the /envs folder. I do this and I do not face any errors, all packages seem to be installed without problems.

Now I try to follow the "Tutorial: Electricity-Only". To do so I run the following command that is provided in the tutorial: "snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_Co2L-24H.nc --configfile config/test/config.electricity.yaml". When I do this I face this error:

(pypsa-eur) C:\Users\DELBARRIOALVAREZ_Y\pypsa-eur>snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_Co2L-24H.nc --configfile config/test/config.electricity.yaml IndentationError in file C:\Users\DELBARRIOALVAREZ_Y\pypsa-eur\Snakefile, line 59: expected an indented block after 'if' statement on line 81: script:

I don't understand the error or the cause because when I go to the Snakefile, line 59 has no different indentation than previous lines. I have tried deleting the if condition and put directly the include command of the config["foresight"] file to see what would happen and the same kind of error appears but in other lines.

I am completely lost, I have never used snakemake before. I have tried to investigate how this package works and I have seen that everything is in Linux, but I have windows. PyPSA works perfectly for me. Is pypsa-eur compatible with Windows?

Any help would be appreciated.

0

There are 0 best solutions below