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

Issue with example #7

Open
staniPetrox opened this issue May 27, 2022 · 5 comments
Open

Issue with example #7

staniPetrox opened this issue May 27, 2022 · 5 comments

Comments

@staniPetrox
Copy link

Invalid value for region (day), must be one of ['DE', 'AT', 'LU', 'DE-LU', 'DE-AT-LU', '50Hertz', 'Amprion', 'TenneT', 'TransnetBW', 'APG', 'Creos']

Just tried to use the example, didn't work

@wirthual
Copy link
Member

Hi,

Thanks for reporting.

Which example are you referring to?

@ThomasRegier
Copy link

ThomasRegier commented Aug 3, 2022

Just had the same issue.

It is the example in the readme.md of
https://github.com/bundesAPI/smard-api)/python-client/

This error is easy to solve:
in the following row, the variables are in the wrong order:
api_instance.filter_region_filter_copy_region_copy_resolution_timestamp_json_get(filter, filter_copy, region, region_copy, resolution, timestamp)

I solved it by making it explicit:
api_instance.filter_region_filter_copy_region_copy_resolution_timestamp_json_get(filter = filter, filter_copy = filter_copy, region = region, region_copy = region_copy, resolution = resolution, timestamp = timestamp)

Anyhow if corrected the following error appears:

`Exception when calling DefaultApi->filter_region_filter_copy_region_copy_resolution_timestamp_json_get: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Content-Security-Policy': "frame-ancestors 'self' *.smard.de; default-src *.gstatic.com *.googleapis.com 'unsafe-inline' 'self' *.smard.de; img-src data: *.googleapis.com *.gstatic.com 'self' *.smard.de 'unsafe-inline'; script-src 'unsafe-eval' 'unsafe-inline' 'self' *.smard.de *.googleapis.com", 'X-Content-Type-Options': 'nosniff', 'X-UA-Compatible': 'IE=edge', 'Date': 'Wed, 03 Aug 2022 14:08:33 GMT', 'Content-Length': '0', 'Set-Cookie': 'bnetza_cookie=!8fEHEKip8IQV+cHp/+OfuGMAvOUzBbJ3ORwq3Jp+Mk9HcFSGJHZ3LcZ+3gpXWV7EaAT6C0ttOU2AeA==; path=/; Httponly; Secure, TS01418b58=01e68c70d5ff1a49d9bf44c221f27ac344df68ca276cf1a36aef1e4f16da1b5af237b486890ccf61f59e82e78fc79c0f704a80e02abff07b76688bcc43d2589ca57071c73a; Path=/; Domain=.www.smard.de; Secure; HTTPOnly', 'Strict-Transport-Security': 'max-age=16070400; includeSubDomains'})`

@lukaspanni
Copy link
Contributor

The example and the whole python client you're referring to is autogenerated which could lead to issues.
Maybe regeneration of the python client could solve the issues?

@ThomasRegier
Copy link

@lukaspanni thanks for your idea.

But since I found a solution for issue #9 I'm able to download the data directly and in a flexible way.

https://stackoverflow.com/questions/73219857/perform-download-via-download-button-when-request-url-in-browser-inspect-does-no/73743659#73743659

I'm just not yet able to match production, consumption, and trade data correctly. Don't know if I do not do the correct check or if the data is just shitty.

@ThomasRegier
Copy link

ThomasRegier commented Oct 6, 2022

Btw: I think the original issue here is solved as soon as my answer from 3rd of August is implemented.

But since I do not use the repository anymore. I deleted it from my computer.

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

4 participants