toddaustin07 / edgebridge

Forwarding Bridge Server for SmartThings Edge drivers
Apache License 2.0
39 stars 19 forks source link

Linux, python 3.11 #12

Closed arkadiusz-kozlowski closed 11 months ago

arkadiusz-kozlowski commented 11 months ago

Getting this error in a loop, every few minutes:

Tue Nov 14 11:56:29 2023  GET request received from: ('192.168.1.100', 45378)
Tue Nov 14 11:56:29 2023  Sending GET to xxxxx
----------------------------------------
Exception occurred during processing of request from ('192.168.1.100', 45378)
Traceback (most recent call last):
  File "/opt/lib/python3.11/socketserver.py", line 317, in _handle_request_noblock
  File "/opt/lib/python3.11/socketserver.py", line 348, in process_request
  File "/opt/lib/python3.11/socketserver.py", line 361, in finish_request
  File "/opt/lib/python3.11/http/server.py", line 671, in __init__
  File "/opt/lib/python3.11/socketserver.py", line 755, in __init__
  File "/opt/lib/python3.11/http/server.py", line 436, in handle
  File "/opt/lib/python3.11/http/server.py", line 424, in handle_one_request
  File "/opt/etc/edgebridge/edgebridge.py", line 514, in do_GET
    proc_msg(self)
  File "/opt/etc/edgebridge/edgebridge.py", line 490, in proc_msg
    handle_requests(server)
  File "/opt/etc/edgebridge/edgebridge.py", line 421, in handle_requests
    proc_forward(server, method, path, arglist[0])
  File "/opt/etc/edgebridge/edgebridge.py", line 170, in proc_forward
    headers = build_headers(server, path)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/etc/edgebridge/edgebridge.py", line 148, in build_headers
    headers['Host'] = path.split('//')[1].split('/')[0]
                      ~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

192.168.1.100 - IP of the SmartthIngs hub.

arkadiusz-kozlowski commented 11 months ago

Ah, sorry, just checked, it is from the Edge Weather V1. Haven`t configured it there fully. yet. Closing