This custom-component allows to create automatically a ngrok tunnel and keep it open. So, if you are under a CGNAT (no way to have a public IPv4), this custom-component helps to get access to the Home Assistant web interface.
Apache License 2.0
16
stars
9
forks
source link
line 156: urllib.request.urlretrieve(url, ngrok_zip_file) error #8
Logger: homeassistant.setup
Source: util/async_.py:168
First occurred: 01:47:25 (1 occurrences)
Last logged: 01:47:25
Error during setup of component ngrok
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/ngrok/init.py", line 223, in async_setup
await async_ngrok_installation()
File "/config/custom_components/ngrok/init.py", line 156, in async_ngrok_installation
urllib.request.urlretrieve(url, ngrok_zip_file)
File "/usr/local/lib/python3.10/urllib/request.py", line 241, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/local/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1293, in _sendrequest
self.putrequest(method, url, **skips)
File "/usr/src/homeassistant/homeassistant/util/async.py", line 180, in protected_loop_func
checkloop(func, strict=strict)
File "/usr/src/homeassistant/homeassistant/util/async.py", line 168, in check_loop
raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use await hass.async_add_executor_job(); at custom_components/ngrok/init.py, line 156: urllib.request.urlretrieve(url, ngrok_zip_file)
I am using raspberry pi 3. I got this error in hassio can you help me?
Logger: homeassistant.setup Source: util/async_.py:168 First occurred: 01:47:25 (1 occurrences) Last logged: 01:47:25
Error during setup of component ngrok Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component result = await task File "/config/custom_components/ngrok/init.py", line 223, in async_setup await async_ngrok_installation() File "/config/custom_components/ngrok/init.py", line 156, in async_ngrok_installation urllib.request.urlretrieve(url, ngrok_zip_file) File "/usr/local/lib/python3.10/urllib/request.py", line 241, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) File "/usr/local/lib/python3.10/urllib/request.py", line 519, in open response = self._open(req, data) File "/usr/local/lib/python3.10/urllib/request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(*args) File "/usr/local/lib/python3.10/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/usr/local/lib/python3.10/urllib/request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/usr/local/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1293, in _sendrequest self.putrequest(method, url, **skips) File "/usr/src/homeassistant/homeassistant/util/async.py", line 180, in protected_loop_func checkloop(func, strict=strict) File "/usr/src/homeassistant/homeassistant/util/async.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use
await hass.async_add_executor_job()
; at custom_components/ngrok/init.py, line 156: urllib.request.urlretrieve(url, ngrok_zip_file)I am using raspberry pi 3. I got this error in hassio can you help me?