I am working on a Raspberry Pi 3 and I am trying to visualize some values of sensors on Munin. I am using Python in order to execute scripts on Munin. I found a script to test and I am trying to execute it but I got the following error :
Traceback (most recent call last):
File "cpu_field", line 23, in munin.main() AttributeError: 'module' object has no attribute 'main'
This is the script : https://github.com/CooledCoffee/python-munin/ Of course, I added at the beginning :
!/usr/bin/env python
But, what I didn't understand is that others scripts are working like this one : https://gist.github.com/tomoconnor/813813
Would be nice if you could put the code in the question as well.
Anyways. The python-munin you use is entirely different and provides no main() function (as it called in line 23). Names for python modules are not protected and 'munin' is a obvious choice used by more than one developer. The first script should run with the module you get with
The other script uses this python-munin module and you probably get it directly from the git repository. They are not compatible.