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

example.yaml throws exception KeyError: 'ME' using pandas #4

Closed
lkimmer opened this issue Nov 11, 2024 · 0 comments
Closed

example.yaml throws exception KeyError: 'ME' using pandas #4

lkimmer opened this issue Nov 11, 2024 · 0 comments

Comments

@lkimmer
Copy link

lkimmer commented Nov 11, 2024

Hello!

First of all: Thank you for the package! Lpagg is exactly what I need. Unfortunately I could not get it to run on the first go.

What I did:

  • Installed the package via anaconda as recommended
  • Downloaded the project as a zip file and unpacked it
  • Started lpagg via command and selected the downloaded example.yaml

Response:

2024-11-11 17:36:12,284 INFO     Read and interpolate the data in weather file C:\Users\XX\Downloads\lpagg-master\lpagg-master\lpagg\resources_weather\TRY2010_04_Jahr.dat
2024-11-11 17:36:12,378 INFO     Year statistics for: C:\Users\XX\Downloads\lpagg-master\lpagg-master\lpagg\resources_weather\TRY2010_04_Jahr.dat
   T_amb average =    9.5 °C
   I_beam,h      =  532.3 kWh/m²
   I_diff,h      =  542.2 kWh/m²
   I_glob,h      = 1074.5 kWh/m²
   G20/15        = 3666.8 K*d
   Heating days  =  258.0 d

Traceback (most recent call last):
  File "pandas\_libs\tslibs\offsets.pyx", line 4089, in pandas._libs.tslibs.offsets._get_offset
KeyError: 'ME'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "pandas\_libs\tslibs\offsets.pyx", line 4190, in pandas._libs.tslibs.offsets.to_offset
  File "pandas\_libs\tslibs\offsets.pyx", line 4095, in pandas._libs.tslibs.offsets._get_offset
ValueError: Invalid frequency: ME

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\XX\AppData\Local\anaconda3\Scripts\lpagg-script.py", line 9, in <module>
    sys.exit(main())
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\lpagg\__main__.py", line 68, in main
    agg_dict = lpagg.agg.aggregator_run(cfg)
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\lpagg\agg.py", line 225, in aggregator_run
    weather_data = load_weather_file(cfg)
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\lpagg\agg.py", line 343, in load_weather_file
    lpagg.weather_converter.analyse_weather_file(
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\lpagg\weather_converter.py", line 649, in analyse_weather_file
    ].resample('ME').sum()
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\pandas\core\frame.py", line 10994, in resample
    return super().resample(
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\pandas\core\generic.py", line 8888, in resample
    return get_resampler(
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\pandas\core\resample.py", line 1522, in get_resampler
    tg = TimeGrouper(**kwds)
  File "C:\Users\XX\AppData\Local\anaconda3\lib\site-packages\pandas\core\resample.py", line 1599, in __init__
    freq = to_offset(freq)
  File "pandas\_libs\tslibs\offsets.pyx", line 4102, in pandas._libs.tslibs.offsets.to_offset
  File "pandas\_libs\tslibs\offsets.pyx", line 4198, in pandas._libs.tslibs.offsets.to_offset
ValueError: Invalid frequency: ME

Did I miss an important step?

@lkimmer lkimmer closed this as completed Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant