Closed spikked27 closed 4 weeks ago
Seeing the same thing. Running in Ubuntu as a container. I click on "Learn IR Code" and get the error 500 Internal Server Error ERROR: Exception in ASGI application
Picture Attached for reference
2023-03-28 13:57:12.070 | INFO | __main__:<module>:48 - OS: posix
2023-03-28 13:57:12.072 | DEBUG | __main__:get_env_ip_list:71 - Environement discovered IP List []
2023-03-28 13:57:12.076 | DEBUG | __main__:get_local_ip_list:64 - Locally discovered IP List ['192.xxx.xxx.xxx', '172.19.0.1', '172.17.0.1']
2023-03-28 13:57:12.076 | INFO | __main__:<module>:126 - Broadlink will try to discover devices on the following IP interfaces: ['192.xxx.xxx.xxx', '172.19.0.1', '172.17.0.1']
2023-03-28 13:57:12.077 | INFO | __main__:<module>:135 - Configuring app
2023-03-28 13:57:12.079 | INFO | __main__:get_analytics_code:179 - Content: <script async src="https://www.googletagmanager.com/gtag/js?id=UA-131664523-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-131664523-2');
</script>
2023-03-28 13:57:12.087 | INFO | __main__:<module>:658 - Broadllink Manager is up and running
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:7020 (Press CTRL+C to quit)
INFO: 192.xxx.xxx.xxx:63396 - "GET /index HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63396 - "GET /index HTTP/1.1" 200 OK
2023-03-28 13:57:25.073 | INFO | __main__:load_devices_from_file:591 - Reading devices from file
INFO: 192.xxx.xxx.xxx:63396 - "GET /devices/load HTTP/1.1" 200 OK
2023-03-28 13:57:28.100 | DEBUG | __main__:get_device_status:640 - 192.xxx.xxx.36
2023-03-28 13:57:28.102 | DEBUG | __main__:get_device_status:640 - 192.xxx.xxx.65
2023-03-28 13:57:28.115 | DEBUG | __main__:get_device_status:643 - b'1\n'
INFO: 192.xxx.xxx.xxx:63399 - "GET /device/ping?host=192.xxx.xxx.65 HTTP/1.1" 200 OK
2023-03-28 13:57:28.225 | DEBUG | __main__:get_device_status:643 - b'1\n'
INFO: 192.xxx.xxx.xxx:63396 - "GET /device/ping?host=192.xxx.xxx.36 HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63436 - "GET /index HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63436 - "GET /all.min.css HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63438 - "GET /adminlte.min.css HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63440 - "GET /hex.js HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63441 - "GET /jquery.min.js HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63443 - "GET /bootstrap.bundle.min.js HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63444 - "GET /adminlte.min.js HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63440 - "GET /home.js?V=4 HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63440 - "GET /clipboard.min.js HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63441 - "GET /broadlink.png HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63438 - "GET /clippy.svg HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63438 - "GET /fa-solid-900.woff2 HTTP/1.1" 200 OK
INFO: 192.xxx.xxx.xxx:63441 - "GET /fa-regular-400.woff2 HTTP/1.1" 200 OK
2023-03-28 14:01:05.451 | INFO | __main__:load_devices_from_file:591 - Reading devices from file
INFO: 192.xxx.xxx.xxx:63438 - "GET /autodiscover?freshscan=0 HTTP/1.1" 200 OK
2023-03-28 14:01:08.494 | DEBUG | __main__:get_device_status:640 - 192.xxx.xxx.36
2023-03-28 14:01:08.499 | DEBUG | __main__:get_device_status:640 - 192.xxx.xxx.65
2023-03-28 14:01:08.504 | DEBUG | __main__:get_device_status:643 - b'1\n'
INFO: 192.xxx.xxx.xxx:63441 - "GET /device/ping?host=192.xxx.xxx.65 HTTP/1.1" 200 OK
2023-03-28 14:01:08.572 | DEBUG | __main__:get_device_status:643 - b'1\n'
INFO: 192.xxx.xxx.xxx:63438 - "GET /device/ping?host=192.xxx.xxx.36 HTTP/1.1" 200 OK
2023-03-28 14:01:15.995 | INFO | __main__:learnir:445 - Learning IR Code for device: 192.xxx.xxx.36
INFO: 192.xxx.xxx.xxx:64959 - "GET /ir/learn?type=0x5f36&host=192.xxx.xxx.36&mac=a0:43:xx:xx:xx:7e HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
The Traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 212, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 84, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette_exporter/middleware.py", line 135, in __call__
await self.app(scope, receive, wrapped_send)
File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in __call__
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 656, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 259, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 61, in app
response = await func(request)
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 161, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/usr/local/lib/python3.8/dist-packages/starlette/concurrency.py", line 39, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 28, in run_sync
return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable,
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 818, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 754, in run
result = context.run(func, *args)
File "broadlinkmanager.py", line 446, in learnir
dev = initDevice(type, host, mac)
File "broadlinkmanager.py", line 374, in initDevice
_mac = bytearray.fromhex(mac)
ValueError: non-hexadecimal number found in fromhex() arg at position 2
Broadlink manager running on raspberry pi with RaspianOS Buster, get it to start up but when I go to connect I get an Internal Server Error and this error in the terminal:
pi@raspberrypi:/opt/broadlinkmanager-docker/broadlinkmanager $ python3 /opt/broadlinkmanager-docker/broadlinkmanager/broadlinkmanager.py 2022-04-03 18:41:43.227 | DEBUG | main:GetLocalIP:30 - 192.168.0.132 2022-04-03 18:41:43.237 | INFO | main::76 - Configuring app
2022-04-03 18:41:43.280 | INFO | main::528 - Broadllink Manager is up and running
INFO: Started server process [3097]
INFO: Uvicorn running on http://0.0.0.0:7020 (Press CTRL+C to quit)
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 388, in run_asgi
asgi = app(self.scope)
TypeError: call() missing 2 required positional arguments: 'receive' and 'send'
INFO: ('192.168.0.232', 54953) - "GET / HTTP/1.1" 500
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 388, in run_asgi
asgi = app(self.scope)
TypeError: call() missing 2 required positional arguments: 'receive' and 'send'
INFO: ('192.168.0.232', 54954) - "GET /favicon.ico HTTP/1.1" 500
^CINFO: Stopping server process [3097]
Any help is apprciated! Note there were multiple modules missing when I first tried to run the .py, uvicorn, starlette_exporter, fastapi, aiofiles, I installed each with sudo pip3 install to get this far