question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Unhandled python exception in read callback

See original GitHub issue

@janvonde: Thanks your message, I’ll move this to the project’s issue tracker


I am trying to get this up and running, but I am getting the following errors:

Oct 20 10:54:35 hs2 collectd[30080]: Unhandled python exception in read callback: KeyError: ‘GetAddonInfos’ Oct 20 10:54:35 hs2 collectd[30080]: read-function of plugin python.fritzcollectd' failed. Will suspend it for 20.000 seconds. Oct 20 10:54:55 hs2 collectd[30080]: Unhandled python exception in read callback: KeyError: 'GetAddonInfos' Oct 20 10:54:55 hs2 collectd[30080]: read-function of pluginpython.fritzcollectd’ failed. Will suspend it for 40.000 seconds.

I installed fritzcollectd, fritzconnection and collectd via pip on a Ubuntu Linux 16.04 box. At collectd I set the ModulePath for the python plugin to /usr/local/lib/python2.7/dist-packages/. The following files are there:

✓ root@hs2 ~ $ ll /usr/local/lib/python2.7/dist-packages/ insgesamt 68K drwxr-sr-x 2 root staff 4.0K Okt 20 09:37 collectd-1.0.dist-info/ -rw-r–r-- 1 root staff 6.7K Okt 20 09:37 collectd.py -rw-r–r-- 1 root staff 9.0K Okt 20 09:37 collectd.pyc drwxr-sr-x 2 root staff 4.0K Okt 20 10:48 fritzcollectd-0.2.0.dist-info/ -rw-r–r-- 1 root staff 6.0K Okt 20 10:48 fritzcollectd.py -rw-r–r-- 1 root staff 6.0K Okt 20 10:48 fritzcollectd.pyc drwxr-sr-x 2 root staff 4.0K Okt 20 09:23 fritzconnection/ drwxr-sr-x 2 root staff 4.0K Okt 20 09:23 fritzconnection-0.4.6.dist-info/ drwxr-sr-x 6 root staff 4.0K Okt 20 09:23 lxml/ drwxr-sr-x 2 root staff 4.0K Okt 20 09:23 lxml-3.6.4.dist-info/ drwxr-sr-x 3 root staff 4.0K Okt 20 09:23 requests/ drwxr-sr-x 2 root staff 4.0K Okt 20 09:23 requests-2.11.1.dist-info/ ✓ root@hs2 ~ $

When I try to run the python file directly I am getting the following error:

✓ root@hs2 /usr/local/lib/python2.7/dist-packages $ python fritzcollectd.py Traceback (most recent call last): File “fritzcollectd.py”, line 157, in <module> collectd.register_config(FC.callback_configure) AttributeError: ‘module’ object has no attribute ‘register_config’ ⚠ root@hs2 /usr/local/lib/python2.7/dist-packages $

Do you have an idea what could be wrong in my setup?

Thanks for this great module and for your time,

Jan

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fetzerchcommented, Oct 21, 2016

I’ve got the same box, but slightly newer firmware from what I can see. Another way of reproducing it here is if I set both User and Password in the config and set User to an incorrect value (you set it to fritzcollectd in your config. Not sure if/how you set the username on the box). Can you please check if it works if you simply comment both out.

0reactions
fetzerchcommented, Oct 22, 2016

Great that it works now. Don’t worry, I’ll update the readme. I’ve The dashboard is now available here: https://grafana.net/dashboards/713

Read more comments on GitHub >

github_iconTop Results From Across the Web

8. Errors and Exceptions — Python 3.11.1 documentation
Errors detected during execution are called exceptions and are not ... it is an unhandled exception and execution stops with a message as...
Read more >
[Example code]-Unhandled exception in listener callback
I don't know what the right solution here is but the main error is happening because of this statement exec("e + {0}= ({1},{2})".format(z,x,y))...
Read more >
Logging uncaught exceptions in Python - Stack Overflow
Use a custom logger with an example handler. This one changes the unhandled exception to go to stdout rather than stderr, but you...
Read more >
Twisted Documentation: Deferred Reference - Twisted Python
Deferred's error handling is modeled after Python's exception handling. In the case that no errors occur, all the callbacks run, one after the...
Read more >
/var/log/messages shows "read-function of plugin `python ...
The error message read-function of plugin `python.nwraidstats' failed is ... collectd[1546]: Unhandled python exception in read callback: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found