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

crash: AttributeError: 'NoneType' object has no attribute 'find' #891

Closed
drook opened this issue Dec 30, 2022 · 2 comments
Closed

crash: AttributeError: 'NoneType' object has no attribute 'find' #891

drook opened this issue Dec 30, 2022 · 2 comments

Comments

@drook
Copy link

drook commented Dec 30, 2022

3.10.1 sometimes (when there's an authentication problem with an already configured source) crashes on start with

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/Nagstamon/QUI/__init__.py", line 4015, in get_status
status = self.server.GetStatus()
File "/usr/local/lib/python3.9/site-packages/Nagstamon/Servers/Generic.py", line 897, in GetStatus
self.init_HTTP()
File "/usr/local/lib/python3.9/site-packages/Nagstamon/Servers/IcingaWeb2.py", line 107, in init_HTTP
if not form.find('input', {'name': form_input}) is None:
AttributeError: 'NoneType' object has no attribute 'find'
zsh: abort (core dumped)  nagstamon.py

This can be easy fixed by changing line 107 in Nagstamon/Servers/IcingaWeb2.py from

if not form.find('input', {'name': form_input}) is None:

to

if form is not None and not form.find('input', {'name': form_input}) is None:
@HenriWahl
Copy link
Owner

@drook thanks for the hint - must have been lost over Christmas. Could you please supply a pull request?

HenriWahl added a commit that referenced this issue Jan 22, 2023
@HenriWahl
Copy link
Owner

@drook done in latest release 3.11-20230122 - please check if it still works at https://github.com/HenriWahl/Nagstamon/releases/tag/latest

HenriWahl added a commit that referenced this issue Jan 26, 2023
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