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

Getting error "No handler found." in openerp

By
sneha antony
on 6/11/14, 8:36 AM 2,233 views

I made changes in /opt/openerp/server/openerp/addons/stock/stock.py.A portion from the code was removed and server was restarted for some bug fixing purposes.But when I enter the url "No handler found." is shown.Thinking that the error is due to the change made in the .py file,I replaced the code but still the error exists.After a long search I found that the solution is with openerp-server.conf file and openerp-server.log file.

The last portions of log file is pasted below:

2014-06-11 10:28:13,959 785 INFO ? openerp.service: Initiating shutdown
2014-06-11 10:28:13,960 785 INFO ? openerp.service: Hit CTRL-C again or send a second signal to force the shutdown.
2014-06-11 10:28:37,786 792 INFO ? openerp: OpenERP version 7.0-20140121-002442
2014-06-11 10:28:37,809 792 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
2014-06-11 10:28:37,809 792 INFO ? openerp: database hostname: localhost
2014-06-11 10:28:37,809 792 INFO ? openerp: database port: 5432
2014-06-11 10:28:37,809 792 INFO ? openerp: database user: openerp
2014-06-11 10:28:38,198 792 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.14` detected
2014-06-11 10:28:38,456 792 CRITICAL ? openerp.modules.module: Couldn't load module web
2014-06-11 10:28:38,456 792 CRITICAL ? openerp.modules.module: invalid syntax (stock.py, line 1213)
2014-06-11 10:28:38,456 792 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 "/opt/openerp/server/openerp/service/__init__.py", line 60, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
  File "/opt/openerp/server/openerp/modules/module.py", line 415, in load_openerp_module
    getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
  File "/opt/openerp/server/openerp/addons/web/http.py", line 628, in wsgi_postload
    openerp.wsgi.register_wsgi_handler(Root())
  File "/opt/openerp/server/openerp/addons/web/http.py", line 517, in __init__
    self.load_addons()
  File "/opt/openerp/server/openerp/addons/web/http.py", line 580, in load_addons
    m = __import__('openerp.addons.' + module)
  File "/opt/openerp/server/openerp/modules/module.py", line 133, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/opt/openerp/server/openerp/addons/stock/__init__.py", line 22, in <module>
    from stock import *
  File "/opt/openerp/server/openerp/addons/stock/stock.py", line 1213
    else:
       ^
SyntaxError: invalid syntax
2014-06-11 10:28:38,506 792 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
2014-06-11 10:28:38,506 792 INFO ? openerp: OpenERP server is running, waiting for connections...
2014-06-11 10:31:51,917 792 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:31:51] "GET /?db=db_test&ts=1402475677168 HTTP/1.1" 404 -
2014-06-11 10:31:51,967 792 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:31:51] "GET /favicon.ico HTTP/1.1" 404 -
2014-06-11 10:31:52,337 792 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:31:52] "GET /?db=db_test&ts=1402475677168 HTTP/1.1" 404 -

 


2014-06-11 10:43:07,506 792 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:43:07] "GET / HTTP/1.1" 404 -
2014-06-11 10:46:41,232 792 INFO ? openerp.service: Initiating shutdown
2014-06-11 10:46:41,232 792 INFO ? openerp.service: Hit CTRL-C again or send a second signal to force the shutdown.
2014-06-11 10:47:04,754 778 INFO ? openerp: OpenERP version 7.0-20140121-002442
2014-06-11 10:47:04,777 778 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
2014-06-11 10:47:04,777 778 INFO ? openerp: database hostname: localhost
2014-06-11 10:47:04,777 778 INFO ? openerp: database port: 5432
2014-06-11 10:47:04,777 778 INFO ? openerp: database user: openerp
2014-06-11 10:47:05,174 778 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.14` detected
2014-06-11 10:47:05,430 778 CRITICAL ? openerp.modules.module: Couldn't load module web
2014-06-11 10:47:05,430 778 CRITICAL ? openerp.modules.module: expected an indented block (stock.py, line 1212)
2014-06-11 10:47:05,430 778 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 "/opt/openerp/server/openerp/service/__init__.py", line 60, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
  File "/opt/openerp/server/openerp/modules/module.py", line 415, in load_openerp_module
    getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
  File "/opt/openerp/server/openerp/addons/web/http.py", line 628, in wsgi_postload
    openerp.wsgi.register_wsgi_handler(Root())
  File "/opt/openerp/server/openerp/addons/web/http.py", line 517, in __init__
    self.load_addons()
  File "/opt/openerp/server/openerp/addons/web/http.py", line 580, in load_addons
    m = __import__('openerp.addons.' + module)
  File "/opt/openerp/server/openerp/modules/module.py", line 133, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/opt/openerp/server/openerp/addons/stock/__init__.py", line 22, in <module>
    from stock import *
  File "/opt/openerp/server/openerp/addons/stock/stock.py", line 1212
    if pick.state in ['done','cancel']:
     ^
IndentationError: expected an indented block

2014-06-11 10:47:05,482 778 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
2014-06-11 10:47:05,483 778 INFO ? openerp: OpenERP server is running, waiting for connections...
2014-06-11 10:47:09,865 778 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:47:09] "GET / HTTP/1.1" 404 -
2014-06-11 10:47:10,354 778 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:47:10] "GET / HTTP/1.1" 404 -
2014-06-11 10:47:10,397 778 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:47:10] "GET / HTTP/1.1" 404 -
2014-06-11 10:47:10,429 778 INFO ? werkzeug: 192.168.1.13 - - [11/Jun/2014 10:47:10] "GET / HTTP/1.1" 404 -

 

 

and my openerp-server.conf file includes

   

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = openerp
db_password = test123
logfile = /var/log/openerp/openerp-server.log


Still I am not able to trace out the proper solution for the issue.Am I missing something in the config file.Please someboby help me in fixing the issue.

1

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 6/11/14, 8:47 AM

Well, it seems not all of your changes were correct. The indentation is wrong file "/opt/openerp/server/openerp/addons/stock/stock.py", on lines 1212 and 1213. Open the file with any smart python editor and you will most likely see a syntax error appear. Most likely it has something to do with the number of spaces (3 instead of 4 for example) before the if-statement.

If you restored all the old code and it still fails, try to reload the server and update the database with flag "-u all".

 

By the way, if you want to alter functionality it is better to stay away from the Odoo core code and create a custom module.

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

1 follower(s)

Stats

Asked: 6/11/14, 8:36 AM
Seen: 2233 times
Last updated: 3/16/15, 8:10 AM