tmo-monitor
tmo-monitor copied to clipboard
Crashes Immediately on macOS
macOS 12.4 Python 3.9.13 tmo-monitor 2.0.0 beta6
All dependencies installed, as far as I know. The main script crashes with:
$ ./bin/tmo-monitor.py Password: 2022/06/20 18:42:29 [DEBUG] Starting new HTTP connection (1): 192.168.12.1:80 2022/06/20 18:42:29 [DEBUG] http://192.168.12.1:80 "GET /fastmile_radio_status_web_app.cgi HTTP/1.1" 200 3318 Traceback (most recent call last): File "/Users/Administrator/Downloads/tmo-monitor-2.0.0-beta6/./bin/tmo-monitor.py", line 83, in <module> signal_info = gw_control.get_signal_info() File "/usr/local/lib/python3.9/site-packages/tmo_monitor/gateway/nokia.py", line 141, in get_signal_info info = signal_request.json() File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Thanks for the bug report. Can you confirm you are using the silver Nokia gateway and the firmware version you're currently on as shown on the admin dashboard at http://192.168.12.1/ in your browser?
I have an Arcadyan KVD21 running firmware 1.00.16. The script only works for the older modem? Thanks.
oh I see, I got the same issue running on Windows 11 thought i'd installed it wrong. @jetblackrx89 for the Arcadyan you need to pass the --model
arg else it errors
tmo-monitor.py --model ARCKVD21
Thanks. It's weird that this would manifest as a crash instead of as a handled error if the user doesn't pass in the right router model string. I ended up just hard-coding the correct model by changing it to "self.model = GatewayModel.ARCADYAN" in the config file at the below path, and it's working now:
/usr/local/lib/python3.9/site-packages/tmo_monitor/configuration.py
@jetblackrx89 you can avoid specifying the model each time by specifying the tmo_model
option in an .env
configuration file without having to manually edit the script itself