"ImportError: No module named cElementTree"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snipper |
New
|
Undecided
|
Unassigned |
Bug Description
After installing the plugin through the steps in de use.wiki file, I (eventually) got this error in Vim at startup:
"ImportError: No module named cElementTree"
The traceback went all the way to ~/bin/snipper/
"import cElementTree as ElementTree"
My default Python installation is v2.5.1. After searching for a solution, I found some useful information in a mailinglist (http://<email address hidden>
"import xml.etree.
This worked like a charm for me. I removed the python-celementtree (because I installed it while finding a solution, and it should not be necessary when using Python 2.5 according to the documentation) and everything was still working like it should.
I presume, but don't know for sure, that this 'fix' could break things when using Python 2.4 (depends on when elementtree was integrated in the standard Python library). I just wanted to let the developers know that I experienced this problem while running the plugin on a fairly 'standard' setup (a fairly standard Ubuntu Linux running Python 2.5.1 as the default installation), and because of the information I found on the mailinglist.
PS: I just got to testing this plugin for the first time, but already have I got this feeling that I'm loving it. Thanks a lot for initiating and maintaining this project!!
I can confirm this bug. My python version is python 2.6.5
The error raised was
""ImportError: No module named cElementTree"
Changing the line
"import cElementTree as ElementTree"
to
"import xml.etree. cElementTree as ElementTree"
solved the problem for me.
Roy