Help

1

No module named 'werkzeug.contrib'

Avatar
elkafil

error message when i try to start odoo 12 instance on ubuntu 18.04


-bash: cd: /oprt: No such file or directory
root@vmi340591:/opt/odoo/odoo/odoo# cd /opt
root@vmi340591:/opt# ./start.sh
root@vmi340591:/opt# Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/odoo-bin", line 5, in <module>
import odoo
File "/opt/odoo/odoo/odoo/odoo/__init__.py", line 129, in <module>
from . import service
File "/opt/odoo/odoo/odoo/odoo/service/__init__.py", line 7, in <module>
from . import wsgi_server
File "/opt/odoo/odoo/odoo/odoo/service/wsgi_server.py", line 25, in <module>
import werkzeug.contrib.fixers
ModuleNotFoundError: No module named 'werkzeug.contrib'

Avatar
Discard
9 Answers
4
Avatar
Darshan Patel
Best Answer


It seems some issue with the new/current version 1.0.0 of the Werkzeug installation on ubuntu 18.04

Try below command, it worked for me :

pip3 unistall Werkzeug (will uninstall earlier version)
pip3 install Werkzeug==0.11.15 (check the requirements.txt and installed that version)

Regards, Darshan!


Avatar
Discard
2
Best Answer

@elkafil

No need more magic to solve ModuleNotFoundError: No module named 'werkzeug.contrib' as the error message says.

Please check out  your /odoo/requirement.txt  dependancy of werkzeug  ( 0.14.1 in my case),  then install it by :

$ cat /odoo/requirement.txt           and find down the version of werkzeug requirement, then
$ sudo pip3 install werkzeug==0.14.1


Hope this will help
Avatar
Discard
1
Avatar
Ayman Al Atrash
Best Answer

Try 

pip3 install werkzeug==0.16.0
Avatar
Discard
0
Avatar
Jhe
Best Answer

My version is odoo11.  And since I install environment in ubuntu16.04. I also got this issue.

After tracing back errors, I got this error.

`Failed building wheel for pyldap`

And after I run this code.
`sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev`
and
`pip3 install -r requirements.txt`

Make sure your werkzeug version in requirements.txt is correct with official document.

then you can execute odoo.


Avatar
Discard
0
Avatar
Enrique David HM
Best Answer

Anyone managed to solve it? I have the same problem.

Avatar
Discard
0
Avatar
elkafil
Best Answer

i resolved my problem by using this script for my install 


sudo wget https://raw.githubusercontent.com/Yenthe666/InstallScript/12.0/odoo_install.sh
Avatar
Discard
0
Best Answer

I'm having same problem right now. This script has always worked for me until now. Who has a solution please? I have an urgent project I'm supposed to submit soonest


Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Traceback (most recent call last):
File "./odoo-bin", line 5, in <module>
import odoo
File "/opt/odoo/odoo/odoo/__init__.py", line 117, in <module>
from . import service
File "/opt/odoo/odoo/odoo/service/__init__.py", line 7, in <module>
from . import wsgi_server
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 25, in <module>
import werkzeug.contrib.fixers
ModuleNotFoundError: No module named 'werkzeug.contrib'
root@ubuntu-s-1vcpu-1gb-nyc3-01:~#

Avatar
Discard
0
Avatar
Diego Almonte
Best Answer

Hi,

I have the same problem, i'm installing a new server with Odoo with the same script thta I have used before many times, but since yesterday I've being having this same error and dont know what to do

Avatar
Discard
0
Avatar
Dishan Madushanka
Best Answer

Hi Elkafil,

I am assuming, that the wrong version of Werkzeug was installed in the fist place. This usually happens, when you have 2 versions of python installed, and you use 'pip' for installing dependencies rather than using 'pip3'. Hope this helped!

2 Comments
Avatar
Discard
Avatar
elkafil
-

thanks

Avatar
elkafil
-

i reinstall server and dependencies with pip3 only but same problem