Open staniPetrox opened 2 years ago
Hi,
Thanks for reporting.
Which example are you referring to?
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'})`
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?
@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.
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.
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.
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