Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes Immediately on macOS #74

Open
jetblackrx89 opened this issue Jun 20, 2022 · 5 comments
Open

Crashes Immediately on macOS #74

jetblackrx89 opened this issue Jun 20, 2022 · 5 comments

Comments

@jetblackrx89
Copy link

jetblackrx89 commented Jun 20, 2022

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/python@3.9/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/python@3.9/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/python@3.9/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)

@highvolt-dev
Copy link
Owner

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?

@jetblackrx89
Copy link
Author

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

@ricterG
Copy link

ricterG commented Jul 18, 2022

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

@jetblackrx89
Copy link
Author

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

@highvolt-dev
Copy link
Owner

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants