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

CLI problem on 6.88 #214

Open
pmbert opened this issue Mar 12, 2024 · 2 comments
Open

CLI problem on 6.88 #214

pmbert opened this issue Mar 12, 2024 · 2 comments

Comments

@pmbert
Copy link

pmbert commented Mar 12, 2024

Hi,
I just installed fritzconnection v1.13.2 on Ubuntu 20.04.6 LTS with pip install fritzconnection

Two things:
Firstly: fritzconnection doesn't display the Fritz!OS version:
`fritzconnection v1.13.2
FRITZ!Box Fon WLAN 7390 at http://192.168.178.1
FRITZ!OS: None

`
(should be 6.88)

Secondly: Command 'c' produces only error messages:
`fritzconnection -i 192.168.178.1 -u User -p Pass -c

fritzconnection v1.13.2
FRITZ!Box Fon WLAN 7390 at http://192.168.178.1
FRITZ!OS: None

Traceback (most recent call last):
File "/home/peter/.local/bin/fritzconnection", line 8, in
sys.exit(main())
File "/home/peter/.local/lib/python3.8/site-packages/fritzconnection/cli/fritzinspection.py", line 165, in main
execute()
File "/home/peter/.local/lib/python3.8/site-packages/fritzconnection/cli/fritzinspection.py", line 160, in execute
run_inspector(inspector, args)
File "/home/peter/.local/lib/python3.8/site-packages/fritzconnection/cli/fritzinspection.py", line 146, in run_inspector
inspector.view_complete_api()
File "/home/peter/.local/lib/python3.8/site-packages/fritzconnection/cli/fritzinspection.py", line 91, in view_complete_api
f"system : {system_info[-1]}\n"
TypeError: 'NoneType' object is not subscriptable

`

Does fritzconnect work with my Fritz!OS version?

@kbr
Copy link
Owner

kbr commented Mar 13, 2024

That's the same error in both cases: the model information is not provided at the expected location in the configuration information provided by the router. I suppose that's a bug in the specific Fritz!OS version.

However, the TypeError should get handled as a bugfix in one of the next versions of fritzconnection.

Beside this the library should work with your router-model.

@pmbert
Copy link
Author

pmbert commented Mar 13, 2024

Thank you for the fast response.
Indeed, it seems to work with my OS.

To suppress the error messages I did changes
in fritzinspection.py:
` try:
print(
f"system : {system_info[-1]}\n"
f"build : {system_info[-2]}\n"
f"hw-code: {system_info[0]}"
)
except:
print('')

`
and also in fritzphonebook.py:
try:
print(f"{name:<30}{', '.join(numbers)}")
except:
print('')

`

Don't know how important this is.

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

2 participants