472,142 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

When I do from lxml import etree I've this error : AttributeError:'module' object has no attribute 'BytesIO'

Hi,

I'm on Ubuntu 8.04.1

I've installed lxml with easy_install lxml command.

Now, when I load etree I've this error :

$ python
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "lxml.etree.pyx", line 40, in lxml.etree (src/lxml/
lxml.etree.c:119415)
AttributeError: 'module' object has no attribute 'BytesIO'
>>>
Have you some idea about this issue ?

Thanks for your help,
Stephane

Aug 25 '08 #1
1 6169
KLEIN Stéphane wrote:
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
>>>from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "lxml.etree.pyx", line 40, in lxml.etree (src/lxml/
lxml.etree.c:119415)
AttributeError: 'module' object has no attribute 'BytesIO'
Do you have a module called "io" lying around in your Python path somewhere?
lxml.etree checks for io.BytesIO (Py2.6/3.0) being available when it starts
up, and only failing that, falls back to StringIO.StringIO (Py <= 2.5).

Stefan
Aug 25 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by py.adriano | last post: by
2 posts views Thread by denny | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.