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

ImportError: dynamic module does not define init function (initcsv) #4

Open
dankeder opened this issue Aug 12, 2015 · 3 comments
Open

Comments

@dankeder
Copy link

The configuration example in README.md recommends to put the plugin into /usr/lib64/collectd/. This directory may contain the file csv.so (the collectd CSV plugin) which conflicts with the standard Python csv module, which is used in haproxy.py. The conflict manifests itself with the following error message in collectd logs:

python plugin: Error importing module "haproxy".
Unhandled python exception in importing module: ImportError: dynamic module does not define init function (initcsv)
Traceback (most recent call last):
File "/usr/lib64/collectd/haproxy.py", line 10, in <module>
              import csv
ImportError: dynamic module does not define init function (initcsv)
python plugin: Found a configuration for the "haproxy" plugin, but the plugin isn't loaded or didn't register a configuration callback.

Since renaming the csv.so collectd plugin is most likely not an option due to backward compatibility, the documentation here should be updated to not recommend putting the plugin into ``/usr/lib64/collectd/`.

@madhur
Copy link

madhur commented Sep 24, 2016

+1

1 similar comment
@smeapng
Copy link

smeapng commented Oct 31, 2016

+1

@arrkerr
Copy link

arrkerr commented Nov 30, 2016

Phew, thanks for pointing that out - you've saved me some serious time.

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

4 participants