Description of problem:
In Fedora 8, supervisord won't start due to import errors
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. install supervisor rpm
2. run /etc/init.d/supervisord start (default supervisord.conf)
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,
d.main(None, test, first)
File "/usr/lib/python2.5/site-packages/supervisor/supervisord.py", line 463,
File "/usr/lib/python2.5/site-packages/supervisor/supervisord.py", line 472,
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>
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
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).
This failed in the same way on Fedora 7 as well. From what I can see, this has
not worked since Fedora Core 6.
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.
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
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
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.
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.
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.)
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.)
email@example.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...
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!
Patch submitted upstream_. I'll be updating the python-meld3 package for
Fedora with this patch which should resolve the problem for supervisor.
.. _: http://www.plope.com/software/collector/261
python-meld3-0.6.4-1.fc7 has been submitted as an update for Fedora 7
python-meld3-0.6.4-1.fc8 has been submitted as an update for Fedora 8
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.
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
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.
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.