TypeError: NewBase must define encode

Asked by moonma

i am new to graphiteand i follwo the doc to install graphite,when i start carbon-cache.py by
sudo /opt/graphite/bin/carbon-cache.py start
it shows:
Starting carbon-cache (instance a)
Traceback (most recent call last):
  File "/opt/graphite/bin/carbon-cache.py", line 32, in <module>
    run_twistd_plugin(__file__)
  File "/opt/graphite/lib/carbon/util.py", line 140, in run_twistd_plugin
    runApp(config)
  File "/usr/local/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 25, in runApp
    runner.run()
  File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 381, in run
    self.application = self.createOrGetApplication()
  File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 448, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/opt/graphite/lib/twisted/plugins/carbon_cache_plugin.py", line 20, in makeService
    from carbon import service
  File "/opt/graphite/lib/carbon/service.py", line 36, in <module>
    import carbon.amqp_listener
  File "/opt/graphite/lib/carbon/amqp_listener.py", line 46, in <module>
    from txamqp.protocol import AMQClient
  File "/usr/local/lib/python2.7/dist-packages/txamqp/protocol.py", line 15, in <module>
    from txamqp.connection import Header, Frame, Method, Body, Heartbeat
  File "/usr/local/lib/python2.7/dist-packages/txamqp/connection.py", line 60, in <module>
    class Payload(with_metaclass(PayloadMeta, object)):
  File "/usr/lib/python2.7/dist-packages/six.py", line 617, in with_metaclass
    return meta("NewBase", bases, {})
  File "/usr/local/lib/python2.7/dist-packages/txamqp/connection.py", line 52, in __new__
    raise TypeError("%s must define %s" % (name, req))
TypeError: NewBase must define encode

i googled and someone say upgrade carbon can slove the problem, but in not work for me.
the graphite is the lastest verson 1.2.0

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
moonma
Solved:
Last query:
Last reply:
Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#1

For latest Graphite you need latest txAMQP module - https://pypi.org/project/txAMQP/

Revision history for this message
moonma (moonma) said :
#2

i solve the problem by upgrade six to the lastest version
and thanks a lot