ERROR ? openerp: Failed to load server-wide module `web`.

Asked by Navaneeth Krishnan

1.this is how i start my server for version 6.1
navaneethk@DT01-015:/home1/navaneethk/6.1/server$ ./openerp-server --addons ../addons/
2.error while running the server is
2012-03-02 05:46:14,466 14741 INFO ? openerp: OpenERP version 6.1
2012-03-02 05:46:14,467 14741 INFO ? openerp: addons paths: /home1/navaneethk/6.1/addons
2012-03-02 05:46:14,467 14741 INFO ? openerp: database hostname: localhost
2012-03-02 05:46:14,467 14741 INFO ? openerp: database port: 5432
2012-03-02 05:46:14,467 14741 INFO ? openerp: database user: navaneethk
2012-03-02 05:46:14,468 14741 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-03-02 05:46:14,469 14741 INFO ? openerp.netsvc: Starting 1 services
2012-03-02 05:46:14,476 14741 WARNING ? openerp.modules.module: module web: module not found
2012-03-02 05:46:14,476 14741 CRITICAL ? openerp.modules.module: Couldn't load module web
2012-03-02 05:46:14,477 14741 CRITICAL ? openerp.modules.module: unsupported operand type(s) for +: 'bool' and 'str'
2012-03-02 05:46:14,492 14741 ERROR ? openerp: Failed to load server-wide module `web`.
The `web` module is provided by the addons found in the `openerp-web` project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
  File "./openerp-server", line 252, in <module>
    openerp.modules.module.load_openerp_module(m)
  File "/home1/navaneethk/6.1/server/openerp/modules/module.py", line 407, in load_openerp_module
    zip_mod_path = mod_path + '.zip'
TypeError: unsupported operand type(s) for +: 'bool' and 'str'
2012-03-02 05:46:14,503 14741 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-03-02 05:46:14,508 14741 INFO ? openerp: OpenERP server is running, waiting for connections...
2012-03-02 05:52:13,793 14741 INFO ? werkzeug: 192.109.209.176 - - [02/Mar/2012 05:52:13] "GET /web/webclient/home HTTP/1.0" 404 -
2012-03-02 05:52:13,861 14741 INFO ? werkzeug: 192.109.209.176 - - [02/Mar/2012 05:52:13] "GET /favicon.ico HTTP/1.0" 404 -
^C2012-03-02 05:55:13,816 14741 INFO ? openerp.netsvc: Stopping 1 services
2012-03-02 05:55:13,816 14741 WARNING ? openerp.service.netrpc_server: Netrpc: closing because of exception [Errno 9] Bad file descriptor
2012-03-02 05:55:14,077 14741 INFO ? openerp.service: Initiating shutdown
2012-03-02 05:55:14,077 14741 INFO ? openerp.service: Hit CTRL-C again or send a second signal to force the shutdown.

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Navaneeth Krishnan
Solved:
Last query:
Last reply:
Revision history for this message
Amit Parik (amit-parik) said :
#1

Hello,

You need to give a web addons path at server side like ./openerp-server --addons=../addons/,../openerp-web/addons/.

Because in latest OpenERP 6.1 and on, our 'web' module of web-addons is loaded as a base. So we must give a web addons
path on server side.
This is not a bug, So I am closing it.

Hope this will help you.

Thanks for understanding!

Revision history for this message
Navaneeth Krishnan (navaneethk) said :
#2

thanks amith..its working for me..

Revision history for this message
Navaneeth Krishnan (navaneethk) said :
#3

thanks amith..its working for me..

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) said :
#4

2012-07-07 21:23:38,306 22526 INFO ? openerp: OpenERP version 6.1
2012-07-07 21:23:38,306 22526 INFO ? openerp: addons paths: /srv/openerp/addons
2012-07-07 21:23:38,307 22526 INFO ? openerp: database hostname: localhost
2012-07-07 21:23:38,307 22526 INFO ? openerp: database port: 5432
2012-07-07 21:22:15,543 21219 INFO ? openerp: database user: fenris
2012-07-07 21:22:15,543 21219 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-07-07 21:22:15,544 21219 INFO ? openerp.netsvc: Starting 1 services
/usr/lib/python2.7/dist-packages/babel/__init__.py:33: UserWarning: Module test was already imported from /srv/openerp/test/__init__.pyc, but /usr/lib/python2.7/dist-packages is being added to sys.path
  from pkg_resources import get_distribution, ResolutionError
2012-07-07 21:22:15,746 21219 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-07-07 21:22:15,748 21219 INFO ? openerp.addons.web: embedded mode
2012-07-07 21:22:15,792 21219 WARNING ? openerp.modules.module:
Ambiguous import: the OpenERP module `crm` is shadowed by another
module (available at /usr/lib/python2.7/dist-packages/crm).
To import it, use `import openerp.addons.<module>.`.
2012-07-07 21:22:15,794 21219 CRITICAL ? openerp.modules.module: Couldn't load module web
2012-07-07 21:22:15,794 21219 CRITICAL ? openerp.modules.module: cannot import name crm
2012-07-07 21:22:15,795 21219 ERROR ? openerp: Failed to load server-wide module `web`.
The `web` module is provided by the addons found in the `openerp-web` project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
  File "./openerp-server", line 252, in <module>
    openerp.modules.module.load_openerp_module(m)
  File "/srv/openerp/modules/module.py", line 419, in load_openerp_module
    getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
  File "/srv/openerp/addons/web/__init__.py", line 29, in wsgi_postload
    app = common.http.Root(o)
  File "/srv/openerp/addons/web/common/http.py", line 453, in __init__
    static_dirs = self._load_addons(openerp_addons_namespace)
  File "/srv/openerp/addons/web/common/http.py", line 523, in _load_addons
    m = __import__('openerp.addons.' + module)
  File "/srv/openerp/modules/module.py", line 139, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/srv/openerp/addons/project_issue/__init__.py", line 23, in <module>
    import project_issue
  File "/srv/openerp/addons/project_issue/project_issue.py", line 22, in <module>
    from crm import crm
ImportError: cannot import name crm

list of addon can be see here : http://paste.ubuntu.com/1080347/

Revision history for this message
Arvin (arvin) said :
#5

I downloaded Openerp 6.2alpha and have the same error with Navaneeth, so where can i find the correct addon path (web-addon). I gave the command ./openerp-server --addons=../openerp/addons but it says the directory is not found...

Revision history for this message
jcdrubay (trobz.com) (jcdrubay) said :
#6

Same for me with OpenERP version 7.0alpha

2012-09-02 05:43:56,970 18954 INFO ? openerp: OpenERP version 7.0alpha
2012-09-02 05:43:56,970 18954 INFO ? openerp: addons paths: /home/jcdrubay/code/openerp-launchpad/web/addons
2012-09-02 05:43:56,970 18954 INFO ? openerp: database hostname: localhost
2012-09-02 05:43:56,970 18954 INFO ? openerp: database port: 5432
2012-09-02 05:43:56,970 18954 INFO ? openerp: database user: openerp
2012-09-02 05:43:56,971 18954 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-09-02 05:43:56,971 18954 INFO ? openerp.netsvc: Starting 1 services
2012-09-02 05:43:56,974 18954 WARNING ? openerp.modules.module: module web: module not found
2012-09-02 05:43:56,976 18954 CRITICAL ? openerp.modules.module: Couldn't load module web
2012-09-02 05:43:56,980 18954 CRITICAL ? openerp.modules.module: unsupported operand type(s) for +: 'bool' and 'str'
2012-09-02 05:43:56,980 18954 ERROR ? openerp: Failed to load server-wide module `web`.
The `web` module is provided by the addons found in the `openerp-web` project.
Maybe you forgot to add those addons in your addons_path configuration.
Traceback (most recent call last):
  File "/home/jcdrubay/code/openerp-launchpad/server/openerp-server", line 257, in <module>
    openerp.modules.module.load_openerp_module(m)
  File "/home/jcdrubay/code/openerp-launchpad/server/openerp/modules/module.py", line 410, in load_openerp_module
    zip_mod_path = mod_path + '.zip'
TypeError: unsupported operand type(s) for +: 'bool' and 'str'
2012-09-02 05:43:56,983 18954 INFO ? openerp: OpenERP server is running, waiting for connections...
2012-09-02 05:43:57,016 18954 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069

Revision history for this message
jcdrubay (trobz.com) (jcdrubay) said :
#7

I found where my problem came from, I had not downloaded the suitable source code for the web:
bzr branch lp:~openerp/openobject-client-web/trunk
instead of
bzr branch lp:~openerp/openerp-web/trunk

Revision history for this message
Brett Lehrer (brett-lehrer) said :
#8

This problem exists even if you download the tarball from http://nightly.openerp.com/trunk/nightly/src/ . My issue is that it never used to be a problem within the tarballs. So what changed?

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#9

Guys,

Did you pass the path of web addons directory to --addons?(Addons path)

Thanks.

Revision history for this message
Brett Lehrer (brett-lehrer) said :
#10

I have never needed to do that. Actually I've never used the --addons argument. The web addons are in the exact same directory as every other addon. I've been able to run every instance of OpenERP exclusively over the web client, even explicitly for the trunk from 2012/08/21 that now does not work. I just tried the command:

./openerp-server --addons-path=openerp/addons/ --load=web

Got the same error. I could try downloading the openerp-web code separately, but it's already all there in the trunk tarball, and has been months that I know of.

Revision history for this message
Brett Lehrer (brett-lehrer) said :
#11

I should mention that I've followed this guide to setting up an OpenERP server for a while now, and it's always proven very reliable:

http://www.theopensourcerer.com/2012/02/how-to-install-openerp-6-1-on-ubuntu-10-04-lts/

I've exclusively used the web client the last dozen times I set OpenERP up this way, and it has always worked until now. Nowhere in the setup does it refer to an addons path to configure, the web server has always been inherently integrated to the tarball.

Revision history for this message
Warwick Allen (warwick-datum-process) said :
#12

I'm also struggling with this with OpenERP 7.0. After downloading the truck branches from launchpad, I have this directory structure:

        wpallen@ubuntu-desktop:/srv/bzr/OpenERP$ ls */trunk
        addons/trunk:
        account/ base_calendar/ edi/ l10n_be/ l10n_pl/ portal/
        [ etc ]

        client/trunk:
        bin/ changelog configure configure.makefile debian/ doc/ Makefile.translation man/ MANIFEST.in
        msgfmt.py mydistutils.py setup.cfg setup.nsi* setup.py*

        server/trunk:
        bin/ debian/ doc/ install/ MANIFEST.in openerp.egg-info/ openerp-wsgi.py scripts/ setup.nsi setup_rpm.sh
        build/ dist/ history/ LICENSE openerp/ openerp-server* README setup.cfg setup.py* win32/

        web/trunk:
        addons/ babel.cfg build/ dist/ doc/ gen_translations.sh* LICENSE logging.json Makefile npybabel.py*
        openerp-web* openerp-web.cfg openerp_web.egg-info/ README setup.py

Then I try to launch the server, but get the fimiliar error message:
        wpallen@ubuntu-desktop:/srv/bzr/OpenERP$ cd server/trunk/
        wpallen@ubuntu-desktop:/srv/bzr/OpenERP/server/trunk$ ./openerp-server --addons=../../addons/trunk/,../../web/trunk/addons/
        2012-09-27 07:39:00,217 29574 INFO ? openerp: OpenERP version 7.0alpha
        2012-09-27 07:39:00,217 29574 INFO ? openerp: addons paths: /srv/bzr/OpenERP/addons/trunk,/srv/bzr/OpenERP/web/trunk/addons
        2012-09-27 07:39:00,218 29574 INFO ? openerp: database hostname: localhost
        2012-09-27 07:39:00,218 29574 INFO ? openerp: database port: 5432
        2012-09-27 07:39:00,218 29574 INFO ? openerp: database user: wpallen
        2012-09-27 07:39:00,295 29574 INFO ? openerp.addons.web: embedded mode
        2012-09-27 07:39:00,402 29574 CRITICAL ? openerp.modules.module: Couldn't load module web
        2012-09-27 07:39:00,402 29574 CRITICAL ? openerp.modules.module: No module named docutils.core
        2012-09-27 07:39:00,402 29574 ERROR ? openerp.service: Failed to load server-wide module `web`.
        The `web` module is provided by the addons found in the `openerp-web` project.
        Maybe you forgot to add those addons in your addons_path configuration.
        Traceback (most recent call last):
          File "/srv/bzr/OpenERP/server/trunk/openerp/service/__init__.py", line 55, in load_server_wide_modules
            openerp.modules.module.load_openerp_module(m)
          File "/srv/bzr/OpenERP/server/trunk/openerp/modules/module.py", line 424, in load_openerp_module
            getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
          File "/srv/bzr/OpenERP/web/trunk/addons/web/__init__.py", line 29, in wsgi_postload
            app = common.http.Root(o)
          File "/srv/bzr/OpenERP/web/trunk/addons/web/common/http.py", line 482, in __init__
            static_dirs = self._load_addons()
          File "/srv/bzr/OpenERP/web/trunk/addons/web/common/http.py", line 544, in _load_addons
            m = __import__('openerp.addons.' + module)
          File "/srv/bzr/OpenERP/server/trunk/openerp/modules/module.py", line 142, in load_module
            mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
          File "/srv/bzr/OpenERP/addons/trunk/project_issue/__init__.py", line 23, in <module>
            import project_issue
          File "/srv/bzr/OpenERP/addons/trunk/project_issue/project_issue.py", line 23, in <module>
            from crm import crm
          File "/srv/bzr/OpenERP/server/trunk/openerp/modules/module.py", line 142, in load_module
            mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
          File "/srv/bzr/OpenERP/addons/trunk/crm/__init__.py", line 25, in <module>
            import crm_lead
          File "/srv/bzr/OpenERP/addons/trunk/crm/crm_lead.py", line 30, in <module>
            from base.res.res_partner import format_address
          File "/srv/bzr/OpenERP/server/trunk/openerp/modules/module.py", line 142, in load_module
            mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
          File "/srv/bzr/OpenERP/server/trunk/openerp/addons/base/__init__.py", line 23, in <module>
            import module
          File "/srv/bzr/OpenERP/server/trunk/openerp/addons/base/module/__init__.py", line 22, in <module>
            import module
          File "/srv/bzr/OpenERP/server/trunk/openerp/addons/base/module/module.py", line 23, in <module>
            from docutils.core import publish_string
        ImportError: No module named docutils.core
        2012-09-27 07:39:00,404 29574 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
        2012-09-27 07:39:00,404 29574 INFO ? openerp.netsvc: Starting 1 services
        2012-09-27 07:39:00,405 29574 INFO ? openerp: OpenERP server is running, waiting for connections...
        2012-09-27 07:39:00,405 29574 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069

What are we doing wrong?

Revision history for this message
BrowseInfo (browseinfo-in) said :
#13

Dear Warwick,

You have to install the python-docutils on your system. Try this command on your terminal

 sudo apt-get install python-docutils

Or go to Administrator-Syneptic Manager and find python-docutils and install it.

This will useful for you.

Thanks!

Revision history for this message
Brett Lehrer (brett-lehrer) said :
#14

I've run into the python-docutils problem as well, unfortunately it only cut out that one line of the error and still wouldn't run. I ended up scrapping trying to get the trunk to run properly for the time being. Even after completely cleaning out the system and redownloading everything from scratch I continued to encounter problems. Leads me to believe that the trunk is just too unstable currently to work on.

For what it's worth, the nightly build tarball of the trunk on nightly.openerp.com is finally being updated again after a week and a half, so hopefully that will be resolved soon.

Revision history for this message
Warwick Allen (warwick-datum-process) said :
#15

@browseinfo-in: Thanks, your tip helped. I now have the server running with no errors being reported.

@Brett: You're right, I'm only one step futher, but it must be possible to run the truck -- the developers must have it running somehow.

Now if I point my browser to http://localhost:8069 it gets redirected to http://localhost:8069/web/webclient/home and I am presented with a 404 Not Found error. The server log reports this:

    INFO ? werkzeug: 127.0.0.1 - - [28/Sep/2012 01:51:57] "GET /web/webclient/home HTTP/1.1" 404 -

I cannot run openerp-web. I have run

    sudo python setup.py install

(from the web/trunk directory) and it seemed to run okay without errors. But then I have this problem:

        wpallen@ubuntu-desktop:/srv/bzr/OpenERP/web/trunk$ ./openerp-web
        [2012-09-28 01:58:41,831] DEBUG:web.common.http:Loading web_tests
        [2012-09-28 01:58:41,831] DEBUG:web.common.http:Loading web_diagram
        [2012-09-28 01:58:41,873] DEBUG:psycopg2:installed. Logging using Python logging module
        [2012-09-28 01:58:42,072] DEBUG:web.common.http:Loading web_view_editor
        Traceback (most recent call last):
          File "./openerp-web", line 108, in <module>
            app = web.common.http.Root(options)
          File "/srv/bzr/OpenERP/web/trunk/addons/web/common/http.py", line 482, in __init__
            static_dirs = self._load_addons()
          File "/srv/bzr/OpenERP/web/trunk/addons/web/common/http.py", line 544, in _load_addons
            m = __import__('openerp.addons.' + module)
        ImportError: No module named web_view_editor

This is unexpected because the web_view_editor addon exists:

        wpallen@ubuntu-desktop:/srv/bzr/OpenERP/web/trunk$ ll -d addons/web_view_editor
        4 drwxr-xr-x 4 root root 4096 Sep 27 15:22 addons/web_view_editor/

I tried running

        ./openerp-web --addons=addons

but got the same result. I think I am close to getting it working. If I can get openerp-web to find the addons, them I'm another step closer.

Revision history for this message
Arthur Mielimonka (openerp-i4) said :
#16

Hello,

I have a similar problems.

When I try to start to start a current version from trunk the server starts without errors:
2012-10-20 20:48:51,260 7903 INFO ? openerp: OpenERP version 7.0alpha
2012-10-20 20:48:51,260 7903 INFO ? openerp: addons paths: /opt/openerp/openobject-addons,/opt/openerp/openerp-web/addons
2012-10-20 20:48:51,261 7903 INFO ? openerp: database hostname: localhost
2012-10-20 20:48:51,261 7903 INFO ? openerp: database port: 5432
2012-10-20 20:48:51,261 7903 INFO ? openerp: database user: openerp
2012-10-20 20:48:52,001 7903 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-10-20 20:48:52,001 7903 INFO ? openerp.netsvc: Starting 1 services
2012-10-20 20:48:52,002 7903 INFO ? openerp: OpenERP server is running, waiting for connections...
2012-10-20 20:48:52,002 7903 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069

But when I try to connect to the server through web interface I get the same error as you got:
   Not Found
   The requested URL was not found on the server.
   If you entered the URL manually please check your spelling and try again.

The server shows:
2012-10-20 20:55:43,530 7903 INFO ? werkzeug: 172.21.200.11 - - [20/Oct/2012 20:55:43] "GET /web/webclient/home HTTP/1.1" 404 -

I even loaded configurations (revisions server 4496, addons 7894, web 3282)
which currently run perfectly on runbot.openerp.com but had the same problem on my server.

A curent version 6.1 shows the following output and runs without problems:
2012-10-20 20:47:46,409 7887 INFO ? openerp: OpenERP version 6.1-20121018-233116
2012-10-20 20:47:46,409 7887 INFO ? openerp: addons paths: /opt/openerp/openerp-6.1-20121018-233116/openerp/addons
2012-10-20 20:47:46,409 7887 INFO ? openerp: database hostname: localhost
2012-10-20 20:47:46,410 7887 INFO ? openerp: database port: 5432
2012-10-20 20:47:46,410 7887 INFO ? openerp: database user: openerp
2012-10-20 20:47:46,411 7887 INFO ? openerp.service.netrpc_server: starting NET-RPC service on 0.0.0.0:8070
2012-10-20 20:47:46,411 7887 INFO ? openerp.netsvc: Starting 1 services
2012-10-20 20:47:46,519 7887 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-10-20 20:47:46,520 7887 INFO ? openerp.addons.web: embedded mode
2012-10-20 20:47:46,851 7887 INFO ? openerp: OpenERP server is running, waiting for connections...

It is obvious that the web addon is additionaly started here and the order of the messages is different.

But I can't understand why the web addon is not started in the current version.
I use the following command to start the server (the load option has no effect and can be omitted):
./openerp-server --addons=../openobject-addons/,../openerp-web/addons --load=web

Can anyone help here? Is there at least an older (6.2) revision which is know to be startable this way?

Thanks,
Arthur

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#17

For CRM Error:

The fact is, pacemaker / Heartbeat also has the crm! (If you have installed these packages)

pacemaker: /usr/lib/python2.X/dist-packages/crm

You can say it is : Ambiguous import: the OpenERP module `crm` is
shadowed by another module.

In order to run safely, you should remove that lib/package.

For 'not found':
- Clear your cache.
- check addons path is right.
- Make sure the user has enough access to access the files.

Thanks.

Revision history for this message
Arthur Mielimonka (openerp-i4) said :
#18

As I have no error such as "module not found", I still cannot imagine why the web module is not loaded?
Can anyone tell me, how the servers on http://runbot.openerp.com/ are started (command line, arguments, environment, etc.)?

Thanks.

Revision history for this message
Arthur Mielimonka (openerp-i4) said :
#19

Sorry guys, I just deleted all caches and it works now!!!

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#20

Arthur, glad to know you got rid of it.

Thanks for the response.

Regards,
Serpent Consulting Services.

Revision history for this message
Brett Lehrer (brett-lehrer) said :
#21

Could you elaborate on that? What caches did you delete? And was that on the client or server end?

Glad to hear you managed to get it working.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#22

Brett,

The cache of the browser!

Which error have you faced? I sense there are more than 1 errors being mentioned here!

But, normally no error comes up!

Thanks.

Revision history for this message
Craig (craig-st) said :
#23

I was also getting the werkzeug "GET /web/webclient/home HTTP/1.1 404" error after moving from OpenERP 6.1 to 7.0, and couldn't figure out what in the world the problem was. Clearing the Firefox browser cache fixed it. Thanks so much!