No module named base_tools

Bug #706227 reported by Michaël Witrant
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP's Framework R&D

Bug Description

I've just installed OpenERP 6 from Debian/Ubuntu packages. When I create a new database, it fails while configuring some addons.

Environment Information :
System : Linux-2.6.32-27-generic-pae-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-27-generic-pae
Operating System Version : #49-Ubuntu SMP Thu Dec 2 00:07:52 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : fr_FR.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/share/pyshared/openerp-server/addons/base/res/res_config.py", line 167, in action_next
    next = self.execute(cr, uid, ids, context=None)
  File "/usr/share/pyshared/openerp-server/addons/account/installer.py", line 571, in execute
    super(account_installer, self).execute(cr, uid, ids, context=context)
  File "/usr/share/pyshared/openerp-server/addons/base/res/res_config.py", line 397, in execute
    new_db, self.pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/share/pyshared/openerp-server/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/usr/share/pyshared/openerp-server/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 716, in load_module_graph
    register_class(package.name)
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 448, in register_class
    fm = imp.find_module(m, ad_paths)
ImportError: No module named base_tools

Related branches

Revision history for this message
xrg (xrg) wrote : Re: [Bug 706227] [NEW] No module named base_tools

On Saturday 22 January 2011, you wrote:
> Public bug reported:
>
> I've just installed OpenERP 6 from Debian/Ubuntu packages. When I create
> a new database, it fails while configuring some addons.

Hm.. You are right.

the __init__.py file in base_tools is missing, perhaps because it is empty in
the bzr branch.

Please, as a temporary workaround, create an _empty_ file at:
/usr/share/pyshared/openerp-server/addons/base_tools/__init__.py

In the meanwhile, we will fix that, thanks for reporting.

Revision history for this message
hielos (hielos-deactivatedaccount) wrote :

I have exactly the same problem. Would it be better to get a former version of the file from the branch and place it there? Thanks.

Revision history for this message
Rosario Lombardo (mail-rosariolombardo) wrote :

The same problem for me, on Ubuntu 10.10.
This is a blocking bug... :-(

Revision history for this message
Michaël Witrant (mike-lepton) wrote :

Rosario, the workaround given by xrg works fine if you can't wait the real fix. Just run this:
sudo touch /usr/share/pyshared/openerp-server/addons/base_tools/__init__.py

Revision history for this message
Azazahmed Saiyed (OpenERP) (saz-openerp) wrote :

Hello,

I have checked the traceback and it occurs due to the __init__.py file missing in the base_tool module. Would you please check the issue with the latest download of stable 6.0 from http://www.openerp.com/downloads.

I have checked this in stable 6.0 and everything works fine, So I am closing this bug for now.

Thanks.

Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Michaël Witrant (mike-lepton) wrote :

I'm already using the latest version. Did you check the *debian/ubuntu package*? The problem comes from this one.

I downloaded it again to be sure :
$ sha1sum openerp-server_*
88f6462ee5cb6986958278ac7907c9876af75f46 openerp-server_6.0.1-0_all (1).deb
88f6462ee5cb6986958278ac7907c9876af75f46 openerp-server_6.0.1-0_all.deb

Changed in openobject-addons:
status: Invalid → New
Revision history for this message
Onur Başer - openerp.biz.tr (onur-bit) wrote :

I got the same bug at ubuntu10.0 x64. I installed OpenERP via deb package.

the following solution worked for me to install base_tools. Thanks Michaël

sudo touch /usr/share/pyshared/openerp-server/addons/base_tools/__init__.py

Changed in openobject-addons:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Matthew Laney (matthewslaney) wrote :

This still is giving me issues. I tried creating the blank file via:

"sudo touch /usr/share/pyshared/openerp-server/addons/base_tools/__init__.py"

After doing this and retrying the configuration, instead of getting:

"No module named base_tools"

I now get

"1"

On the details page I get:

Python Version : 2.5.2
OpenERP-Client Version : 6.0.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/orm.py", line 1961, in write
    self.datas[object_id].update(vals2)
KeyError: 1

Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

I got the files from http://www.openerp.com/download/stable/deb/openerp-server_6.0.1-0_all.deb and everything is ok

md5sum www.openerp.com/download/stable/deb/openerp-server_6.0.1-0_all.deb
b84c8e3ec4e1ad0eb3688ef0629683ec www.openerp.com/download/stable/deb/openerp-server_6.0.1-0_all.deb

$ ls -altr /usr/share/pyshared/openerp-server/addons/base_tools/__openerp__.py
-rw-r--r-- 1 root root 348 2011-01-19 12:41 /usr/share/pyshared/openerp-server/addons/base_tools/__openerp__.py

Revision history for this message
Alexandr Mitev (bessangel) wrote :

I do
1) sudo touch /usr/share/pyshared/openerp-server/addons/base_tools/__init__.py

and add this line to /etc/openerp-server.conf
2) addons_path = /usr/share/pyshared/openerp-server/addons/

then all start works

Revision history for this message
Vo Minh Thu (thu) wrote :

I haven't found a way to force the Debian packaging to retain blank file so a comment was added to base_tools and marketing_campaign_crm_demo __init__.py files. The fix is in 6.0 at revision 4486 and in trunk at revision 4601. New .deb packages will be provided soon.

Changed in openobject-addons:
status: In Progress → Fix Released
Revision history for this message
OpenBMS JSC (openbmsjsc) wrote :

I think you can use technique similar to that of in other Debian packages, e.g. in cron

more /etc/cron.d/.placeholder
# DO NOT EDIT OR REMOVE
# This file is a simple placeholder to keep dpkg from removing this directory

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.