Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How do I fix this error: "ImportError: No module named etree.ElementTree"?

By
Josh Stover
on 3/7/13, 2:40 PM 7,330 views

Environment Information : System : Windows-Vista-6.1.7601-SP1 OS Name : nt Operating System Release : Vista Operating System Version : 6.1.7601 Operating System Architecture : 32bit Operating System Locale : en_US.cp1252 Python Version : 2.5.2 OpenERP-Client Version : 6.0.4 Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last): File "netsvc.pyo", line 489, in dispatch File "service\web_services.pyo", line 599, in dispatch File "osv\osv.pyo", line 122, in wrapper File "osv\osv.pyo", line 176, in execute File "osv\osv.pyo", line 167, in execute_cr File "C:\Program Files (x86)\OpenERP 6.0\Server\addons\base\module\wizard\base_module_upgrade.py", line 98, in upgrade_module File "pooler.pyo", line 60, in restart_pool File "pooler.pyo", line 39, in get_db_and_pool File "addons__init__.pyo", line 883, in load_modules File "addons__init__.pyo", line 716, in load_module_graph File "addons__init__.pyo", line 450, in register_class File "C:\Program Files (x86)\OpenERP 6.0\Server\addons\shipping_bista__init__.py", line 23, in <module> File "C:\Program Files (x86)\OpenERP 6.0\Server\addons\shipping_bista\shippingservice.py", line 5, in <module> ImportError: No module named etree.ElementTree

1

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/7/13, 4:02 PM

Hi,

see this documentation for alias etree in "import xml.etree.ElementTree as etree" line 5 :

http://www.bigfatalien.com/?p=223

Correction to do :

in file addons\shipping_bista\shippingservice.py :

line 5 change to :

import xml.etree.ElementTree as xml

line 64 change to :

root = xml.fromstring(response_text)

line 328 change to :

root = etree.fromstring(response_text)

this will solve your errror.

Bye

Thanks! But I'm still getting the same error. Pardon my ignorance but do I need to recompile, etc, and if so what would the process be?

Josh Stover
on 3/7/13, 4:48 PM

You have to restart openerp server and update the module naturally.

Cyril Gaspard (GEM)
on 3/7/13, 4:57 PM

Thanks again for your assistance. I restarted the server and attempted to update the module again. I'm still getting the same error message. I have installed this on a Windows 8 machine, would that have anything to do with it?

Josh Stover
on 3/8/13, 4:30 PM

try this, in module delete all files finishing by .yc, restart openerp server and update the module. Verify too, if in server\library.zip you have the library/folder name xml. Bye

Cyril Gaspard (GEM)
on 3/8/13, 6:53 PM
0
Josh Stover
On 3/7/13, 4:48 PM

Thanks! But I'm still getting the same error. Pardon my ignorance but do I need to recompile, etc, and if so what would the process be?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/7/13, 2:40 PM
Seen: 7330 times
Last updated: 3/16/15, 8:10 AM