FZJ-IEK3-VSA / pylpg

Python interface for the LoadProfileGenerator
MIT License
14 stars 4 forks source link

Issue with running Python code #11

Open nicobrinkel opened 1 year ago

nicobrinkel commented 1 year ago

Hi all,

Thanks for this amazing project! I tried running the example file 'single_household.py' using Spyder (Python 3.9.12) by cloning the Git-project. When running this code, the following error occured: File ~\surfdrive\Bestanden\Grid tariff design paper\Scripts\pylpg\examples\single_household.py:15 electricity_profile = data["Electricity_HH1"]

TypeError: 'NoneType' object is not subscriptable

I tried looking into the files, and looking into the 'lpg_execution.py' script, but I did not find the error. Would you know what this error could be?

Thanks! Best regards, Nico Brinkel

Pawangit042021 commented 11 months ago

Hello,

I am also facing the same problem. Has this been resolved ?

Thanks. Best regards, Pawan

knife2meetu commented 9 months ago

Hi,

in my case, the issue was that I did not have Microsoft's .NET Desktop Runtime installed which is required to start the load profile generator. Without the LPG running in the first place, the library can only return empty values, hence the "None" output you get.

You can verify if that is the problem by heading into your pyLPG directory and trying to run the "LoadProfileGenerator.exe" you'll find there. It will actually take you to the .NET download page if necessary. After installation (& possibly a reboot) you should be fine.

Hope it helps!