Skip to Content
Menu
This question has been flagged
3 Replies
15718 Views

We installed odoo using yenthe's odoo installation script, It install python 2.7. 

When we try to run a module using num2words  using following link https://www.rosehosting.com/blog/install-odoo-11-on-ubuntu-16-04/

it throws following error.

Error:

Odoo Server Error

Traceback (most recent call last):

File "/odoo/odoo-server/odoo/http.py", line 647, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/odoo/odoo-server/odoo/http.py", line 307, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/odoo/odoo-server/odoo/http.py", line 689, in dispatch

result = self._call_function(**self.params)

File "/odoo/odoo-server/odoo/http.py", line 339, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper

return f(dbname, *args, **kwargs)

File "/odoo/odoo-server/odoo/http.py", line 332, in checked_call

result = self.endpoint(*a, **kw)

File "/odoo/odoo-server/odoo/http.py", line 933, in __call__

return self.method(*args, **kw)

File "/odoo/odoo-server/odoo/http.py", line 512, in response_wrap

response = f(*args, **kw)

File "/odoo/odoo-server/addons/web/controllers/main.py", line 934, in call_button

action = self._call_kw(model, method, args, {})

File "/odoo/odoo-server/addons/web/controllers/main.py", line 922, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/odoo/odoo-server/odoo/api.py", line 689, in call_kw

return call_kw_multi(method, model, args, kwargs)

File "/odoo/odoo-server/odoo/api.py", line 680, in call_kw_multi

result = method(recs, *args, **kwargs)

File "<decorator-gen-40>", line 2, in button_immediate_install

File "/odoo/odoo-server/odoo/addons/base/module/module.py", line 71, in check_and_log

return method(self, *args, **kwargs)

File "/odoo/odoo-server/odoo/addons/base/module/module.py", line 448, in button_immediate_install

return self._button_immediate_function(type(self).button_install)

File "/odoo/odoo-server/odoo/addons/base/module/module.py", line 541, in _button_immediate_function

modules.registry.Registry.new(self._cr.dbname, update_module=True)

File "/odoo/odoo-server/odoo/modules/registry.py", line 85, in new

odoo.modules.load_modules(registry._db, force_demo, status, update_module)

File "/odoo/odoo-server/odoo/modules/loading.py", line 343, in load_modules

loaded_modules, update_module)

File "/odoo/odoo-server/odoo/modules/loading.py", line 242, in load_marked_modules

loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)

File "/odoo/odoo-server/odoo/modules/loading.py", line 121, in load_module_graph

load_openerp_module(package.name)

File "/odoo/odoo-server/odoo/modules/module.py", line 368, in load_openerp_module

__import__('odoo.addons.' + module_name)

File "/odoo/odoo-server/odoo/modules/module.py", line 82, in load_module

exec(open(modfile, 'rb').read(), new_mod.__dict__)

File "<string>", line 4, in <module>

File "/addons/consol_reports_rck/models/__init__.py", line 3, in <module>

from . import models

File "/addons/consol_reports_rck/models/models.py", line 14, in <module>

from num2words import num2words

ImportError: No module named 'num2words'

When we run the same module from a system installed using following link it runs ok https://www.getopenerp.com/install-odoo-10-on-ubuntu-16-04/.

When we try to install num2words using pip it gets installs but same error throws back

Avatar
Discard
Best Answer

Hi,

I think libraries are not installed in python3.

Try following steps:

sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

sudo apt-get install python3-pip

sudo python3 -m pip install -r requirements.txt (go to odoo directory and the run this command)

sudo -H pip install PyPDF2

sudo -H pip install PyPDF2

Hope this will help you.

Sudhir Arya
ERP Harbor Consulting Services
Skype:sudhir@erpharbor.com
Website: http://www.erpharbor.com
Avatar
Discard
Author

It worked ji thanks!

Best Answer

I Love you Brothers/Sisters.

We also installed odoo using yenthe's odoo installation script, It install python 2.7.
we got exactly the same Problems. Sudhir Arya solution worked. You safe my day.
Thanks


Avatar
Discard
Related Posts Replies Views Activity
3
Oct 23
4383
2
Jan 23
3781
1
Dec 22
8348
7
Jun 21
22705
1
Dec 19
7554