mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GMG-Devel] Python 3 - ImportError: cannot import name etree (Python 3.3


From: Ben Sturmfels
Subject: [GMG-Devel] Python 3 - ImportError: cannot import name etree (Python 3.3/Trisquel 7.0/python3-lxml 3.3.3)
Date: Mon, 07 Sep 2015 01:05:32 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

Hi there,

I'm having a play with the Python 3 support.

When running `./bin/gmg dbupdate` I'm getting the following (full
traceback attached separately):

      File "/usr/lib/python3/dist-packages/lxml/html/__init__.py", line
42, in <module>
        from lxml import etree
    ImportError: cannot import name etree

That's running with Python 3.3 and lxml==3.3.3 from the Trisquel 7.0
package python3-lxml. I've just done a quick test and this import works
fine on Python 3.4. I've also found that lxml==3.3.3 works fine when
installed from PyPI. It seems that the Trisquel package has created:

  /usr/lib/python3/dist-packages/lxml/etree.cpython-34m-x86_64-linux-gnu.so

but not:

/usr/lib/python3/dist-packages/lxml/etree.cpython-33m-x86_64-linux-gnu.so

Is this likely just a bug in the Trisquel python3-lxml package?

And a slightly unrelated question, given Python 3 support hasn't been
made official yet, would it be worth targetting Python 3.4 by default
now that it's part of stable Debian and Trisquel (and presumably Ubuntu
too)?

Cheers,
Ben

-- 
Ben Sturmfels

Sturm
www.sturm.com.au
(03) 9024 2467

Attachment: etree-importerror.txt
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]