views:

89

answers:

2

I installed Yahoo BOSS (it's a python installation that allows you to use their search features). I followed everything perfectly. However, when I run the example, to confirm that it works, I got this:

$python ex3.py
Traceback (most recent call last):
  File "ex3.py", line 16, in ?
    from yos.yql import db
  File "/usr/lib/python2.4/site-packages/yos/yql/db.py", line 44, in ?
    from yos.crawl import rest
  File "/usr/lib/python2.4/site-packages/yos/crawl/rest.py", line 13, in ?
    import xml2dict
  File "/usr/lib/python2.4/site-packages/yos/crawl/xml2dict.py", line 6, in ?
    import xml.etree.ElementTree as ET
ImportError: No module named etree.ElementTree

Is there any way to fix this? I did exactly as stated in the documentation, and it was installed on a fresh box.

Okay, people have stated that Python 2.5 should be used. However, everything currently uses Python 2.4, what do I do, to get this YAHOO BOSS to work?

Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
A: 

A google search reveals that you need to install the effbot elementtree Python module.

Jonathan Feinberg
Hi, I installed that, but doesn't work. i guess it's about the Python 2.5.
TIMEX
+3  A: 

Use Python 2.5 or above: xml.etree.ElementTree was added in 2.5.

http://docs.python.org/library/xml.etree.elementtree.html

Jeffrey Hulten
How do I use Python 2.5 or above...when everything else right now is built for python 2.4?
TIMEX
What OS are you using alex?
unutbu
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
TIMEX
I am using CentOS
TIMEX
CentOS 5 uses 2.4 (just like RHEL5). It looks like elementtree was sourced from the community, so you may be able to add the package "python-elementtree-1.2.6-5.i386.rpm" in yum and get it to work. Otherwise, find a python 2.5 RPM from a reputable source.
Jeffrey Hulten