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

Select source error #181

Open
p4ve opened this issue Jun 8, 2022 · 0 comments
Open

Select source error #181

p4ve opened this issue Jun 8, 2022 · 0 comments

Comments

@p4ve
Copy link

p4ve commented Jun 8, 2022

Logger: homeassistant.util.async_
Source: util/async_.py:132
First occurred: 20:38:46 (1 occurrences)
Last logged: 20:38:46

Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for samsungtv_tizen doing I/O at custom_components/samsungtv_tizen/smartthings.py, line 38: cmdurl = requests.post(API_COMMAND,data=COMMAND_REFRESH ,headers=REQUEST_HEADERS)

Logger: homeassistant.components.websocket_api.http.connection
Source: util/async_.py:140
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 20:38:46 (1 occurrences)
Last logged: 20:38:46

[140638379283072] I/O must be done in the executor; Use await hass.async_add_executor_job() at custom_components/samsungtv_tizen/smartthings.py, line 38: cmdurl = requests.post(API_COMMAND,data=COMMAND_REFRESH ,headers=REQUEST_HEADERS)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
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 "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 667, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 863, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 704, in _handle_entity_call
await result
File "/config/custom_components/samsungtv_tizen/media_player.py", line 975, in async_select_source
await self.hass.async_add_job(self.async_play_media,ch_media_type, source_key)
File "/config/custom_components/samsungtv_tizen/media_player.py", line 876, in async_play_media
smartthings.device_update(self)
File "/config/custom_components/samsungtv_tizen/smartthings.py", line 38, in device_update
cmdurl = requests.post(API_COMMAND,data=COMMAND_REFRESH ,headers=REQUEST_HEADERS)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.9/http/client.py", line 1279, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.9/http/client.py", line 1290, in send_request
self.putrequest(method, url, **skips)
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 219, in putrequest
return HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 151, in protected_loop_func
check_loop()
File "/usr/src/homeassistant/homeassistant/util/async
.py", line 140, in check_loop
raise RuntimeError(
RuntimeError: I/O must be done in the executor; Use await hass.async_add_executor_job() at custom_components/samsungtv_tizen/smartthings.py, line 38: cmdurl = requests.post(API_COMMAND,data=COMMAND_REFRESH ,headers=REQUEST_HEADERS)

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

1 participant