Open dsbanfield opened 1 month ago
Thank you for locating the earlier report of this issue. It indicates it was resolved and the fix was merged to the main repository? Is it not in the current main release (3.24.1)?
I've confirmed I'm running 3.24.1 but seeing the same error.
2024-10-12 17:20:24.363 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f462ada05d0>, <Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>) inside the event loop by custom integration 'tesla_custom' at custom_components/tesla_custom/__init__.py, line 174: controller = TeslaAPI( (offender: /usr/local/lib/python3.12/ssl.py, line 713: context.load_default_certs(purpose)), please create a bug report at https://github.com/alandtse/tesla/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component
result = await _async_setup_component(hass, domain, config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 461, in _async_setup_component
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/setup.py", line 463, in <genexpr>
create_eager_task(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
await self.async_setup(hass, integration=integration)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/tesla_custom/__init__.py", line 174, in async_setup_entry
controller = TeslaAPI(
It appears this issue (https://github.com/zabuldon/teslajsonpy/pull/474 ) has been worked and accepted(?) into the main code base. What is the process and possible timeline for an official point release containing this? TIA -Dean
Someone submits a PR to add it.
I have the same issue. I have tested version 3.24.1 against teslajsonpy 3.12.1 which has the proposed fix [https://github.com/zabuldon/teslajsonpy/pull/474]
Running HA version: 2024.10.2
It does not solve the problem as now ssl_context has no value? I hope my output helps in solving this problem.
homeassistant | File "/config/custom_components/tesla_custom/config_flow.py", line 96, in async_step_credentials homeassistant | info = await validate_input(self.hass, user_input) homeassistant | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ homeassistant | File "/config/custom_components/tesla_custom/config_flow.py", line 260, in validate_input homeassistant | controller = TeslaAPI( homeassistant | ^^^^^^^^^ homeassistant | File "/usr/local/lib/python3.12/site-packages/teslajsonpy/controller.py", line 148, in init homeassistant | ssl_context.load_verify_locations(api_proxy_cert) homeassistant | ^^^^^^^^^^^ homeassistant | UnboundLocalError: cannot access local variable 'ssl_context' where it is not associated with a value
Same here:
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f50b76a50>, <Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>) inside the event loop by custom integration 'tesla_custom' at custom_components/tesla_custom/init.py, line 174: controller = TeslaAPI( (offender: /usr/local/lib/python3.12/ssl.py, line 713: context.load_default_certs(purpose)), please create a bug report at https://github.com/alandtse/tesla/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs
Traceback (most recent call last):
File "
Is there an existing issue for this?
I have read about the Fleet API and understand I may need to use it
Version of the Tesla component
v3.24.1
Version of the Tesla car software
2024.32.3
Model
Model Y
Current Behavior
During startup of Home Assistant, I get a traceback in the logs, generated by the Tesla integration component. I am encountering periodic crashes of my entire HA instance and this is something that has shown up in my diagnosis of that larger problem. I am not asserting that the Tesla component is the cause of my crashes. I have not concluded that analysis yet.
Expected Behavior
Tracebacks are not expected to happen in normal operations.
Debug logs
Anything else?
No response