question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Climate broken: AttributeError: 'Vehicle' object has no attribute 'region'

See original GitHub issue

Hi!

climate service is broken in latest version

2021-11-13 14:21:37 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'Vehicle' object has no attribute 'region'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/kia_uvo/__init__.py", line 91, in async_handle_start_climate
    await vehicle.start_climate(set_temp, duration, defrost, climate, heating)
  File "/config/custom_components/kia_uvo/Vehicle.py", line 138, in start_climate
    if(self.engine_type == VEHICLE_ENGINE_TYPE.EV and self.region == REGION_CANADA):
AttributeError: 'Vehicle' object has no attribute 'region'
2021-11-13 14:21:37 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2967215264] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 523, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1243, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/kia_uvo/__init__.py", line 91, in async_handle_start_climate
    await vehicle.start_climate(set_temp, duration, defrost, climate, heating)
  File "/config/custom_components/kia_uvo/Vehicle.py", line 138, in start_climate
    if(self.engine_type == VEHICLE_ENGINE_TYPE.EV and self.region == REGION_CANADA):
AttributeError: 'Vehicle' object has no attribute 'region'


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesT42commented, Nov 14, 2021

I was now able to delete the integration an add it again. But the error is still there.

2021-11-14 23:58:36 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'Vehicle' object has no attribute 'region'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/kia_uvo/__init__.py", line 91, in async_handle_start_climate
    await vehicle.start_climate(set_temp, duration, defrost, climate, heating)
  File "/config/custom_components/kia_uvo/Vehicle.py", line 150, in start_climate
    if self.engine_type == VEHICLE_ENGINE_TYPE.EV and self.region == REGION_CANADA:
AttributeError: 'Vehicle' object has no attribute 'region'
2021-11-14 23:58:36 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2969353544] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 523, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1243, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 353, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 371, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 571, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/kia_uvo/__init__.py", line 91, in async_handle_start_climate
    await vehicle.start_climate(set_temp, duration, defrost, climate, heating)
  File "/config/custom_components/kia_uvo/Vehicle.py", line 150, in start_climate
    if self.engine_type == VEHICLE_ENGINE_TYPE.EV and self.region == REGION_CANADA:
AttributeError: 'Vehicle' object has no attribute 'region'

Also I see no way to reopen this issue…

0reactions
JamesT42commented, Nov 15, 2021

Yes thank you it is fixed now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR: 'Vehicle' object has no attribute 'get_control' #36
You need to update to the recent CARLA release 0.9.3, which will resolve this issue. ... The scenario_runner.py and manual_control.py both worked.
Read more >
AttributeError: 'Car' object has no attribute 'manufacturer'
Since you did not have manufacturer attribute it was throwing error now you can make a object of class and pass values and...
Read more >
'entry' object has no attribute 'set' - You.com | The AI Search ...
You are getting that AttributeError because you initially bind a string "" to the global name labeltext , and a Python string doesn't...
Read more >
AttributeError: 'Car' object has no attribute 'drive_car'
This code gives me the following error: AttributeError: 'Car' object has no attribute 'drive_car' I have no idea what's wrong.
Read more >
Attributeerror Client Object Has No Attribute Reference | piac.ps
Assume a dataset under the interview attributeerror client object has no attribute reference. Fully managed environment of running containerized.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found