ModuleNotFoundError: No module named 'zope.event' while running bin/start_odoo
Hey guys,
I have been playing around with buildout to install Odoo 12 on ubuntu 18.04 and finally I have successfully compiled and generated the required scripts and odoo.cfg file. But, when I run bin/start_odoo, I get this error:
Traceback (most recent call last):
File "/home/ubuntu/bin/gevent_odoo", line 59, in <module>
gevent.monkey.patch_all()
File "/opt/buildout/eggs/cp36m/gevent-20.9.0-py3.6-linux-x86_64.egg/gevent/monkey.py", line 1210, in patch_all
from gevent import events
File "/opt/buildout/eggs/cp36m/gevent-20.9.0-py3.6-linux-x86_64.egg/gevent/events.py", line 71, in <module>
from zope.event import subscribers
My buildout.cfg(downloaded from internet):
[buildout]
parts =
env
odoo
newest = false
# Reduce Buildout download & build time (http://www.buildout.org/en/latest/topics/optimizing.html)
eggs-directory = /opt/buildout/eggs
download-cache = /opt/buildout/download-cache
abi-tag-eggs = true
# Install build extensions
extensions =
gp.vcsdevelop
vcs-extend-develop = git+https://github.com/anybox/anybox.recipe.odoo@master#egg=a.r.odoo
vcs-update = true
[versions]
psutil = 2.2.1
[env]
recipe = gocept.recipe.env
[odoo_vars]
# Odoo community
odoo_branch = 12.0
odoo_git = https://github.com/odoo/odoo.git
odoo_dir = ${buildout:parts-directory}/odoo
# Enterprise add-ons
enterprise_branch = 12.0
enterprise_git = https://github.com/odoo/enterprise.git
enterprise_dir = ${buildout:parts-directory}/enterprise
# OCA add-ons
oca_git = https://github.com/oca
oca_dir = ${buildout:parts-directory}/oca
oca_server-tools_branch=12.0
oca_web_branch=12.0
## Custom add-ons
#custom_git = ssh://[email protected]/custom
#custom_dir = ${buildout:parts-directory}/custom
#custom_branch = release/1.0
[odoo]
# GIT settings to boost speed
git-depth = 1
git-warn-sha-pins = False
update-git-submodules = always
# Odoo anybox recipe
recipe = anybox.recipe.odoo:server
release = ${odoo_vars:odoo_branch}
# Python eggs
eggs =
psycogreen
pyusb
unidecode
inouk.recipe.odoo_cmd
PyWebDav
nameparser
phonenumbers
pyOpenSSL
num2words
xlrd==1.0.0
pyPDF2
gevent
werkzeug==0.16.1
zope.event
# Git install Odoo Community
version = git ${odoo_vars:odoo_git} ${odoo_vars:odoo_dir} ${odoo:release}
addons =
# GIT Enterprise add-ons
; git ${odoo_vars:enterprise_git} ${odoo_vars:enterprise_dir} ${odoo_vars:enterprise_branch}
# GIT OCA add-ons
git ${odoo_vars:oca_git}/server-tools.git ${odoo_vars:oca_dir}/server-tools ${odoo_vars:oca_server-tools_branch}
git ${odoo_vars:oca_git}/web.git ${odoo_vars:oca_dir}/web ${odoo_vars:oca_web_branch}
## GIT Custom add-ons
# ; git ${odoo_vars:custom_git}/customer-x.git ${odoo_vars:custom_dir} ${odoo_vars:custom_branch}
# Odoo configuration file
# - db settings
options.db_host = 127.0.0.1
options.db_user = odoo
options.db_password = False
# - directory settings
options.data_dir = /var/lib/odoo
# - application settings
options.logfile = ${buildout:directory}/var/log/odoo/odoo-server.log
options.logrotate = True
options.without_demo = True
# - system settings
options.proxy_mode = True
options.limit_time_cpu = 900
options.limit_time_real = 1200
options.workers = 2
options.max_cron_threads = 1
# Upgrade script
#upgrade_script = odoo_upgrade.py run
Can anyone please help me in fixing this error?
The error occurs in gevent, and the installed version is not compatible with Odoo 12. See https://github.com/odoo/odoo/blob/12.0/requirements.txt#L7-L8.
This weekend a fix was merged that allows you to add, under [odoo], the parameter apply-requirements-file = True. That will automatically honour the versions from this file. Can you try that? (that feature was already available for a long time but it was broken with recent versions of pip).