Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: ImportError: No module named openerp

by
Andy Torres
- 05/13/2016 08:42:29
I run export PYTHONPATH="${PYTHONPATH}:/home/andy/odoo-8.0-20150903/openerp"
 but nothing so far, it stills says "No module named openerp".
So, I cd into the odoo folder, and run gunicorn openerp.service.wsgi_server.application -c openerp-wsgi.py. Now it doesn't throws the same error, but this one instead. Below is the full log trace:
andy@desarrollo06 ~/odoo-8.0-20150903 $ gunicorn openerp.service.wsgi_server.application -c openerp-wsgi.py
/home/andy/odoo-8.0-20150903
2016-05-13 12:41:05 [3597] [INFO] Starting gunicorn 17.5
2016-05-13 12:41:05 [3597] [INFO] Listening at: http://0.0.0.0:8069 (3597)
2016-05-13 12:41:05 [3597] [INFO] Using worker: sync
2016-05-13 12:41:05 [3604] [INFO] Booting worker with pid: 3604
2016-05-13 12:41:06 [3604] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
2016-05-13 12:41:06 [3604] [INFO] Worker exiting (pid: 3604)
2016-05-13 12:41:06 [3605] [INFO] Booting worker with pid: 3605
2016-05-13 12:41:06 [3605] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
2016-05-13 12:41:06 [3605] [INFO] Worker exiting (pid: 3605)
2016-05-13 12:41:06 [3606] [INFO] Booting worker with pid: 3606
2016-05-13 12:41:06 [3606] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
2016-05-13 12:41:06 [3606] [INFO] Worker exiting (pid: 3606)
2016-05-13 12:41:06 [3607] [INFO] Booting worker with pid: 3607
2016-05-13 12:41:06 [3607] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 473, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 115, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 33, in load
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 362, in import_app
    __import__(module)
ImportError: No module named application
2016-05-13 12:41:06 [3607] [INFO] Worker exiting (pid: 3607)
Traceback (most recent call last):
  File "/usr/bin/gunicorn", line 9, in <module>
    load_entry_point('gunicorn==17.5', 'console_scripts', 'gunicorn')()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 42, in run
    WSGIApplication("%(prog)s [OPTIONS] APP_MODULE").run()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 144, in run
    Arbiter(self).run()
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 196, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 291, in halt
    self.stop()
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 334, in stop
    self.reap_workers()
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 430, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>


Andy Torres Utra
Esp. B en Ciencias Informáticas
andy@lt.desoft.cu
El 12/05/16 a las 17:32, Graeme Gellatly escribió:
It will just be a path error.  Either export the path to openerp into your python path or start your server there.  I think those instructions assume that openerp was installed using python setup.py install which places the files in the python packages directory which of course is already in the path.

On Fri, May 13, 2016 at 8:26 AM, Stefan Becker <ich@funbaker.de> wrote:
I'm not very familar with gunicorn, but on the python side of view, it looks like there are one or more files missing.
Can you post the output of the following commands?

ls -l /home/andy/odoo/odoo-8.0-20150903/
ls -l /home/andy/odoo/odoo-8.0-20150903/openerp

On Do, 2016-05-12 at 18:56 +0000, Andy Torres Utra wrote:
> Hi, I'm deploying Odoo 8 using Apache and mod_wsgi, I followed the steps detailed here and here, but whenever I try to > start the apache server, I get this error with the openerp-wsgi.py file: > import openerp > ImportError: No module named openerp > I even tried to launch the server running > gunicorn openerp.service.wsgi_server.application -c /home/andy/odoo/odoo-8.0-20150903/openerp-wsgi.py > , but it still throws me the error. > I'd appreciate if someone points me in the right direction. Thanks in advance > _______________________________________________ > Mailing-List: https://www.odoo.com/groups/community-framework-62 > Post to: mailto:expert-framework@mail.odoo.com > Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe