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

get_entity_live_data Issue #1

Open
NovaSkyrim opened this issue Mar 4, 2022 · 3 comments
Open

get_entity_live_data Issue #1

NovaSkyrim opened this issue Mar 4, 2022 · 3 comments

Comments

@NovaSkyrim
Copy link

NovaSkyrim commented Mar 4, 2022

Hey mate,

Thank you for your beautiful library. I have an issue while running the example function get_entity_live_data here : link

Can you help me please ?

Thx ;)

python version: 3.9.5

Traceback (most recent call last):
File "C:\Users\clemd\OneDrive\Bureau\Projet Disney\get_entity_live_data.py", line 29, in
api_response = api_instance.get_entity_live_data(entity_id)
File "C:\Python\Python395\lib\site-packages\openapi_client\api\entities_api.py", line 531, in get_entity_live_data
return self.get_entity_live_data_endpoint.call_with_http_info(**kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\api_client.py", line 850, in call_with_http_info
return self.api_client.call_api(
File "C:\Python\Python395\lib\site-packages\openapi_client\api_client.py", line 409, in call_api
return self.__call_api(resource_path, method,
File "C:\Python\Python395\lib\site-packages\openapi_client\api_client.py", line 224, in __call_api
return_data = self.deserialize(
File "C:\Python\Python395\lib\site-packages\openapi_client\api_client.py", line 325, in deserialize
deserialized_data = validate_and_convert_types(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1569, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1462, in attempt_convert_item
raise conversion_exc
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1453, in attempt_convert_item
return deserialize_model(input_value, valid_class,
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1373, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 369, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model\entity_live_data_response.py", line 192, in _from_openapi_data
setattr(self, var_name, var_value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 184, in setattr
self[attr] = value
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 509, in setitem
self.set_attribute(name, value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 156, in set_attribute
value = validate_and_convert_types(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1619, in validate_and_convert_types
input_value[index] = validate_and_convert_types(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1569, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1462, in attempt_convert_item
raise conversion_exc
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1453, in attempt_convert_item
return deserialize_model(input_value, valid_class,
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1373, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 369, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model\entity_live_data.py", line 208, in _from_openapi_data
setattr(self, var_name, var_value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 184, in setattr
self[attr] = value
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 509, in setitem
self.set_attribute(name, value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 156, in set_attribute
value = validate_and_convert_types(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1569, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1462, in attempt_convert_item
raise conversion_exc
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1453, in attempt_convert_item
return deserialize_model(input_value, valid_class,
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1373, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 369, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model\live_queue.py", line 196, in _from_openapi_data
setattr(self, var_name, var_value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 184, in setattr
self[attr] = value
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 509, in setitem
self.set_attribute(name, value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 156, in set_attribute
value = validate_and_convert_types(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1569, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1462, in attempt_convert_item
raise conversion_exc
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1453, in attempt_convert_item
return deserialize_model(input_value, valid_class,
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1373, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 369, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 45, in wrapped_init
return fn(_self, *args, **kwargs)
File "C:\Python\Python395\lib\site-packages\openapi_client\model\live_queue_standby.py", line 172, in _from_openapi_data
setattr(self, var_name, var_value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 184, in setattr
self[attr] = value
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 509, in setitem
self.set_attribute(name, value)
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 156, in set_attribute
value = validate_and_convert_types(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1569, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "C:\Python\Python395\lib\site-packages\openapi_client\model_utils.py", line 1448, in attempt_convert_item
raise get_type_error(input_value, path_to_item, valid_classes,
openapi_client.exceptions.ApiTypeError: Invalid type for variable 'wait_time'. Required value type is float and passed type was NoneType at ['received_data']['live_data'][0]['queue']['standby']['wait_time']

@TheLoki2020
Copy link

I've got the same issue, have you managed to get it to work?

@cearum
Copy link

cearum commented Aug 26, 2022

I've figured out that when the queue data is not a float (null data) then it creates that issue.

I'm not sure how to fix it in their code, but if you add the _check_return_type=False into the request it will skip checking the return types and continue. This should just give a waitTime of None which you can use however you wish.

try:
    # Get live data for this entity and any child entities
    api_response = api_instance.get_entity_live_data(entity_id, _check_return_type=False)
    pprint(api_response)

@eric-vo
Copy link

eric-vo commented Jun 30, 2023

I had this same issue but with return times being null, thanks for sharing a (temporary) fix!

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