tmo-monitor icon indicating copy to clipboard operation
tmo-monitor copied to clipboard

Crashes Immediately on macOS

Open jetblackrx89 opened this issue 2 years ago • 5 comments

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)

jetblackrx89 avatar Jun 20 '22 22:06 jetblackrx89

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?

highvolt-dev avatar Jun 20 '22 22:06 highvolt-dev

I have an Arcadyan KVD21 running firmware 1.00.16. The script only works for the older modem? Thanks.

jetblackrx89 avatar Jun 23 '22 00:06 jetblackrx89

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

ricterG avatar Jul 18 '22 23:07 ricterG

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 avatar Jul 18 '22 23:07 jetblackrx89

@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

highvolt-dev avatar Jan 10 '23 21:01 highvolt-dev