Bug 433306 - supervisord has python import errors
Summary: supervisord has python import errors
Alias: None
Product: Fedora
Classification: Fedora
Component: python-meld3
Version: 8
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Toshio Ernie Kuratomi
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-02-18 15:27 UTC by John Hein
Modified: 2008-03-13 07:48 UTC (History)
1 user (show)

Fixed In Version: 0.6.4-1.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-03-13 07:47:09 UTC
Type: ---

Attachments (Terms of Use)
New meld3.py potentially fixing import errors (47.95 KB, text/plain)
2008-02-27 00:57 UTC, Toshio Ernie Kuratomi
no flags Details

Description John Hein 2008-02-18 15:27:01 UTC
Description of problem:

In Fedora 8, supervisord won't start due to import errors

Version-Release number of selected component (if applicable):




How reproducible:

every time

Steps to Reproduce:
1. install supervisor rpm
2. run /etc/init.d/supervisord start (default supervisord.conf)

Actual results:

Starting supervisord: Unlinking stale socket /var/tmp/supervisor.sock
Traceback (most recent call last):
  File "/usr/bin/supervisord", line 6, in <module>
  File "/usr/lib/python2.5/site-packages/supervisor/supervisord.py", line 724,
in main
    d.main(None, test, first)
  File "/usr/lib/python2.5/site-packages/supervisor/supervisord.py", line 463,
in main
  File "/usr/lib/python2.5/site-packages/supervisor/supervisord.py", line 472,
in run
  File "/usr/lib/python2.5/site-packages/supervisor/options.py", line 833, in
    self.httpserver = make_http_server(self, supervisord)
  File "/usr/lib/python2.5/site-packages/supervisor/http.py", line 751, in
    from web import supervisor_ui_handler
  File "/usr/lib/python2.5/site-packages/supervisor/web.py", line 4, in <module>
    import meld3
  File "/usr/lib/python2.5/site-packages/meld3/__init__.py", line 2, in <module>
    from meld3 import parse_xml
  File "/usr/lib/python2.5/site-packages/meld3/meld3.py", line 8, in <module>
    from elementtree.ElementTree import TreeBuilder
ImportError: No module named elementtree.ElementTree

Expected results:

Additional info:

The python-elementtree package has not been in fedora since Fedora Core 6.  It
looks like the ElementTree package is now part of base python (in xml/etree).

Comment 1 John Hein 2008-02-26 16:27:30 UTC
This failed in the same way on Fedora 7 as well.  From what I can see, this has
not worked since Fedora Core 6.

Comment 2 Mike McGrath 2008-02-26 16:45:38 UTC
There's a new version of this out as well.  I've not been the most attentive
packager for this :-/  I'll try to get it fixed today.  Its a pretty useful package.

Comment 3 Mike McGrath 2008-02-26 17:49:20 UTC
Sell shoot, this is a python 2.5 issue, I've got some of the imports fixed but
others, like those in:


Don't seem to have a clean import in python2.5.  If anyone happens upon this bug
and knows their equiv's in python2.5 please let me know, I've been bugging the
guys in #python on irc.freenode.net

Comment 4 John Hein 2008-02-26 19:53:46 UTC
Yeah... I started to replace imports with xml.etree that is the 2.5 place for
it, but, as you found out, it wasn't quite that simple.

I was hoping you would have the magic answer.  Otherwise, I would have included
a patch ;)

I googled a bit, but didn't find a workaround.

One alternative solution would be to bring in the old python-elementtree, but I
don't know how well that can co-exist with python 2.5.

Maybe the next step is to ask the plope.com folks what they do to support python 2.5

Comment 5 John Hein 2008-02-26 19:59:39 UTC
p.s. I did look through the archives at

There was one thread regarding ElementTree dependency issues, but it was not a
2.5 problem - it was a problem with the user's local environment (using 2.4)...


We should probably open up a dialog on that mailing list and see if anyone there
has an idea.  I'll do that in a bit unless you beat me to it.

Comment 6 John Hein 2008-02-26 23:36:18 UTC
See http://supervisord.org/pipermail/supervisor-users/2008-February/000182.html

It seems to be as I suspected.  The 2.5 ElementTree doesn't have everything that
the old python-elementtree package had.  And supervisor/meld3 is dependent on
some of that.

See the response in the link above about partial overlap between the ElementTree
in python-2.5 and the old python-elementtree.

Comment 7 Toshio Ernie Kuratomi 2008-02-27 00:55:16 UTC
Hi John,

Do you use the web interface to supervisor?  I looked at the last version of
python-elementtree in Fedora and think that I have something that will work but
I don't use the web interface at all (and really only use this on RHEL5).  I'll
attach a new version of:


If you are able to copy that into your version and test it out I think we might
be close to a solution that can be sent upstream.

If this works we'll want to pretty this up so that it can try both what works
for python-2.5 and python-elementtree.  Also, Mike, this is against meld3-0.6.3.
 If there's a newer update we might have to update the imports and maybe change
the setup.py (judging from the mailing list posts.)

Comment 8 Toshio Ernie Kuratomi 2008-02-27 00:57:30 UTC
Created attachment 296010 [details]
New meld3.py potentially fixing import errors

Note that this will fix the ImportError regardless.  The real question is
whether this breaks HTML rendering (as used by supervisor's web interface.)

Comment 9 John Hein 2008-02-27 01:44:08 UTC
a.badger@gmail.com wrote 2008-02-26 19:55 EST:
 > Hi John,
 > Do you use the web interface to supervisor?

I haven't used it at all yet.  It won't run - that's what prompted this bug ;)

So the answer is no.  But I doubt I'd use it much.  inetd doesn't have a web
interface, but I doubt I'd use it either.

That said, I don't know what the web interface does.  If supervisor keeps
statistics on when it has to restart a child, that might be interesting
information.  But using a command line program is fine with me.

 > If you are able to copy that into your version and test it out I think we
 > might be close to a solution that can be sent upstream.

I'll give it a try.  As far as sending a version upstream, my guess is that they
are likely not going to accept something that removes the http stuff.

It seems that their position is that Fedora should fix its package building to
use python's easy_install.  See this message in the thread I started on the
supervisor mailing list...


Comment 10 Toshio Ernie Kuratomi 2008-02-27 02:30:00 UTC
I think you misunderstood :-).

The patch will almost definitely get the commandline portion working as that's
just an import error (which this patch fixes).  But it touches the web interface
portion so testing that the web interface works with this applied means that I
can send it upstream.

As far as easy_install goes, that is the wrong solution to any problem related
to building a package.  easy_install goes onto the network and installs things
on the system that is building the package.  This breaks in our builders because
downloading things would be prevented for security and it doesn't solve the
problem as it downloads to the builder rather than your machine where it's

It would probably fix this issue for you if you ran easy_install locally (since
that would download the packages to your machine) but we're lucky you didn't as,
with any luck, this report will get the problem fixed in Fedora and a patch sent
upstream to do the right thing on python-2.5 for future upstream versions :-)

Let us know if it works!

Comment 11 Toshio Ernie Kuratomi 2008-02-28 17:38:11 UTC
Patch submitted upstream[1]_.  I'll be updating the python-meld3 package for
Fedora with this patch which should resolve the problem for supervisor.

.. _[1]: http://www.plope.com/software/collector/261

Comment 12 Fedora Update System 2008-02-28 20:41:42 UTC
python-meld3-0.6.4-1.fc7 has been submitted as an update for Fedora 7

Comment 13 Fedora Update System 2008-02-28 20:43:02 UTC
python-meld3-0.6.4-1.fc8 has been submitted as an update for Fedora 8

Comment 14 John Hein 2008-02-28 20:50:58 UTC
Sorry for the delayed feedback, but it did work.  That is to say, it allowed me
to start supervisord.

I don't _think_ I misunderstood your question about the web interface, by the
way.  I realized you were only talking about the web interface.  And I
understand that the patch was intended to get the command line version working.
 What I don't know is how the web interface is affected.  And since, as I was
trying to say, I haven't used the web interface (and probably won't), I can't
say whether it has been broken now - it obviously was broken before the patch
since the damn thing wouldn't even start ;).

So, while the patch gets me what I wanted, I don't know if it breaks some
feature of supervisor that I don't use.  I'll let the upstream folks talk to that...

As far as the easy_install part, I think the supervisor maintainer was
suggesting emulating what easy_install does for purposes of building the Fedora
package.  He was not suggesting that the Fedora package itself run easy_install
upon installation (i.e., having yum/rpm run easy_install or some such radically
non-rpm concept).  So, it might be helpful if the Fedora package maintainer used
easy_install or emulated what easy_install does in order to _build_ the rpm(s),
since (as he intimated) easy_install is the canonical way to get python packages
up and running.  I was just passing along his comment, but I think you
misinterpreted it.  In any case, I'll let you Fedora package maintainers work
that all out - i.e, whether it's worth investigating using easy_install to help
you build rpms.

Comment 15 Fedora Update System 2008-03-01 09:27:29 UTC
python-meld3-0.6.4-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-meld3'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-2155

Comment 16 Fedora Update System 2008-03-13 07:47:07 UTC
python-meld3-0.6.4-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2008-03-13 07:48:30 UTC
python-meld3-0.6.4-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.