You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importtimefromdeutschlandimportmarktstammdatenfromdeutschland.marktstammdaten.apiimportdaten_apifromdeutschland.marktstammdaten.model.einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get200_responseimportEinheitEinheitJsonGetErweiterteOeffentlicheEinheitStromerzeugungGet200Responsefrompprintimportpprint# Defining the host is optional and defaults to https://www.marktstammdatenregister.de/MaStR# See configuration.py for a list of all supported configuration parameters.configuration=marktstammdaten.Configuration(
host="https://www.marktstammdatenregister.de/MaStR"
)
# Enter a context with an instance of the API clientwithmarktstammdaten.ApiClient() asapi_client:
# Create an instance of the API classapi_instance=daten_api.DatenApi(api_client)
sort="sort_example"# str | Spalte, nach der auf- oder absteigend sortiert werden soll (optional)page=1# int | Seite, die geladen werden soll (optional)page_size=1# int | Anzahl an Einträgen pro Seite (optional)filter="filter_example"# str | Syntax: Feld-name~[eq|neq|sw|ct|nct|ew|null|nn]~'Wert'~[and|or]~... (optional)# example passing only required values which don't have defaults set# and optional valuestry:
# Erweiterte öffentliche Daten zur Stromerzeugungapi_response=api_instance.einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get(sort=sort, page=page, page_size=page_size, filter=filter)
pprint(api_response)
exceptmarktstammdaten.ApiExceptionase:
print("Exception when calling DatenApi->einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get: %s\n"%e)
Traceback (most recent call last):
File "main_marktstammdaten.py", line 26, in <module>
api_response = api_instance.einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get(sort=sort, page=page, page_size=page_size, filter=filter)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/api/daten_api.py", line 168, in einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get
return self.einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get_endpoint.call_with_http_info(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/api_client.py", line 997, in call_with_http_info
return self.api_client.call_api(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/api_client.py", line 452, in call_api
return self.__call_api(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/api_client.py", line 249, in __call_api
return_data = self.deserialize(response_data, response_type, _check_type)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/api_client.py", line 357, in deserialize
deserialized_data = validate_and_convert_types(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1611, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1485, in attempt_convert_item
raise conversion_exc
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1472, in attempt_convert_item
return deserialize_model(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1377, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 49, in wrapped_init
return fn(_self, *args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 359, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 49, in wrapped_init
return fn(_self, *args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model/einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get200_response.py", line 198, in _from_openapi_data
setattr(self, var_name, var_value)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 180, in __setattr__
self[attr] = value
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 497, in __setitem__
self.set_attribute(name, value)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 156, in set_attribute
value = validate_and_convert_types(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1661, in validate_and_convert_types
input_value[index] = validate_and_convert_types(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1611, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1485, in attempt_convert_item
raise conversion_exc
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1472, in attempt_convert_item
return deserialize_model(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1377, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 49, in wrapped_init
return fn(_self, *args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 359, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 49, in wrapped_init
return fn(_self, *args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model/entry.py", line 629, in _from_openapi_data
setattr(self, var_name, var_value)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 180, in __setattr__
self[attr] = value
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 497, in __setitem__
self.set_attribute(name, value)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 156, in set_attribute
value = validate_and_convert_types(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1611, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/marktstammdaten/model_utils.py", line 1466, in attempt_convert_item
raise get_type_error(
deutschland.marktstammdaten.exceptions.ApiTypeError: Invalid type for variable 'gemarkung'. Required value type is str and passed type was NoneType at ['received_data']['data'][0]['gemarkung']
The text was updated successfully, but these errors were encountered:
Any update on this issue? I was trying to use the API and at first I shrugged at the example not working. But the same exact error occurs again when I try to use einheit_einheit_json_get_erweiterte_oeffentliche_einheit_stromerzeugung_get() in my own functions.
Example from https://github.com/bundesAPI/marktstammdaten-api/blob/main/python-client/docs/DatenApi.md
The text was updated successfully, but these errors were encountered: