Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Start Carbon - 12.04 - Python Error - ImportError: cannot import name daemonize

Tags:

I am really hoping someone can help me as I have spent at-least 15 hours trying to fix this problem. I have been given a task by a potential employer and my solution is to use graphite/carbon/collectd. I am trying to run and install carbon / graphite 0.9.12 but I simply can't get carbon to start. Every time I try and start carbon I end up with the following error. I am using a bash script to install to keep everything consistent.

I don't really know python at all so would appreciate any help you can provide.

/etc/rc0.d/K20carbon-cache -> ../init.d/carbon-cache /etc/rc1.d/K20carbon-cache -> ../init.d/carbon-cache /etc/rc6.d/K20carbon-cache -> ../init.d/carbon-cache /etc/rc2.d/S20carbon-cache -> ../init.d/carbon-cache /etc/rc3.d/S20carbon-cache -> ../init.d/carbon-cache /etc/rc4.d/S20carbon-cache -> ../init.d/carbon-cache /etc/rc5.d/S20carbon-cache -> ../init.d/carbon-cache   Traceback (most recent call last): File "/opt/graphite/bin/carbon-cache.py",  line 28, in from carbon.util import run_twistd_plugin File        "/opt/graphite/lib/carbon/util.py",  line 21, in from twisted.scripts._twistd_unix import daemonize  ImportError: cannot import name daemonize 

Thanks

Shane

like image 266
Shane Baldacchino Avatar asked Nov 10 '13 20:11

Shane Baldacchino


People also ask

How do you fix ImportError Cannot import name in Python?

If the error occurs due to a circular dependency, it can be resolved by moving the imported classes to a third file and importing them from this file. If the error occurs due to a misspelled name, the name of the class in the Python file should be verified and corrected.

How do you solve ImportError Cannot import name?

The Python "ImportError: cannot import name" occurs when we have circular imports (importing members between the same files). To solve the error, move the objects to a third file and import them from a central location in other files, or nest one of the imports in a function.


1 Answers

pip install 'Twisted<12.0' 

As you can see in the requirements.txt, the newer version of Twisted does not seems to play well with it

like image 93
user120027 Avatar answered Sep 18 '22 11:09

user120027