This question has been flagged
1 Reply
4826 Views

Hi Guys, 

I am setting up odoo with uWSGI.
Odoo is installed in home directory. --> 

/home/pandey/workspace/Project/

--> Odoo - /home/pandey/workspace/Project/odoo (Odoo Folder)

This is my odoo-wsgi.py:

# WSGI Handler sample configuration file.
import odoo
#----------------------------------------------------------
# Common
#----------------------------------------------------------
odoo.multi_process = True # Nah!
# Equivalent of --load command-line option
odoo.conf.server_wide_modules = ['base', 'web']
conf = odoo.tools.config

conf['addons_path'] = '/home/pandey//,/home/pandey//'
conf['http_port'] = 8069
conf['longpolling_port'] = 8072
conf['proxy-mode'] = True
conf['logfile'] = '/var/log/odoo/odoo.log'
conf['logrotate'] = True
conf['db_host'] = '127.0.0.1'
conf['db_user'] = 'odoo'
conf['db_port'] = 5435
conf['db_password'] = 'odoo'
#----------------------------------------------------------
# Generic WSGI handlers application
#----------------------------------------------------------
application = odoo.service.wsgi_server.application
odoo.service.server.load_server_wide_modules()
workers = 4
timeout = 240
max_requests = 2000


Running this via below command:

sudo uwsgi --http :8069 --pythonpath /home/pandey/workspace/Project/odoo/odoo-bin --wsgi-file /home/pandey/workspace/Project/odoo-wsgi.py

But getting these errors:


1)

added /home/pandey/workspace/Project/odoo/odoo-bin to pythonpath.
Traceback (most recent call last):
  File "/home/pandey/workspace/Project/odoo-wsgi.py", line 15, in <module>
    import odoo
ImportError: No module named odoo

2) 


*** Operational MODE: single process ***
Traceback (most recent call last):
  File "/home/pandey/workspace/Project/odoo-wsgi.py", line 22, in <module>
    odoo.conf.server_wide_modules = ['base', 'web']
AttributeError: module 'odoo' has no attribute 'conf'
Please take a look.
Avatar
Discard
Best Answer

Any update on this?

Avatar
Discard