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

AttributeError Query for contracted reserve amount and contracted reserve prices not working #370

Closed
brunolehner opened this issue Nov 20, 2024 · 5 comments

Comments

@brunolehner
Copy link

brunolehner commented Nov 20, 2024

Hi,
I tried to use the query to get the contracted reserve amount and contracted reserve prices for Austria in 2023.
But unfortunately it is not working. I used the following code:

# load packages from entsoe import EntsoeRawClient import pandas as pd

client = EntsoeRawClient(api_key='XY')

start = pd.Timestamp('20230101', tz='Europe/Vienna') end = pd.Timestamp('20231231', tz='Europe/Vienna') country_code = 'AT' # Austria type_marketagreement_type = 'A01'

client.query_contracted_reserve_amount(country_code, type_marketagreement_type, start, end, psr_type=None)
client.query_contracted_reserve_prices(country_code, type_marketagreement_type, start=start, end=end, psr_type=None)

I get:

  • AttributeError: 'str' object has no attribute 'tzinfo'

  • TypeError: EntsoeRawClient.query_contracted_reserve_prices() got multiple values for argument 'start'

Can someone help me out?

@fboerman
Copy link
Collaborator

fboerman commented Nov 20, 2024 via email

@brunolehner
Copy link
Author

Hi,
I tried using explicit arguements, e.g.:
client.query_contracted_reserve_amount(country_code = 'AT', type_marketagreement_type = 'A01', start = pd.Timestamp('20230101', tz='Europe/Vienna'), end = pd.Timestamp('20231231', tz='Europe/Vienna'), psr_type=None)

Now I get "NoMatchingDataError"

Is there no data for Austria in 2023 available?

@fboerman
Copy link
Collaborator

hi did you check if there is data on the UI for the dates you are requesting?

@christianfosli
Copy link
Contributor

I'm not an expert but thought I'd chime in as I struggled with something similar:

These two endpoints are marked as "legacy" in the Entsoe UI, and replaced by "Volumes and Prices of Contracted Reserves". For the cases I tested for NO2 the legacy endpoints do not return any data, but query_contracted_reserve_prices_procured_capacity does!

Note that currently it seems we need to use the Raw client instead of the Pandas client if we need volumes in addition to prices though (see my issue #374)

@fboerman
Copy link
Collaborator

ah yes you are correct @christianfosli I need to fix this in #374 (or if somebody wants to help feel free to open a PR!)

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

3 participants