Sunday, 21 June 2015

ImportError: No module named phonenumbers

Sometime we install community module in our system and facing error like No module ****. This blog is for what I face the same error. Might be helpful to you guys.

Module name => base_phone

Server Traceback:

Traceback (most recent call last):
  File "/home/openerp/workspace/openerp/server/openerp/service/__init__.py", line 60, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
  File "/home/openerp/workspace/openerp/server/openerp/modules/module.py", line 415, in load_openerp_module
    getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
  File "/home/openerp/workspace/openerp/web/addons/web/http.py", line 628, in wsgi_postload
    openerp.wsgi.register_wsgi_handler(Root())
  File "/home/openerp/workspace/openerp/web/addons/web/http.py", line 517, in __init__
    self.load_addons()
  File "/home/openerp/workspace/openerp/web/addons/web/http.py", line 580, in load_addons
    m = __import__('openerp.addons.' + module)
  File "/home/openerp/workspace/openerp/server/openerp/modules/module.py", line 133, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/home/openerp/workspace/openerp/fpg/base_phone/__init__.py", line 22, in <module>
    from . import base_phone
  File "/home/openerp/workspace/openerp/custom_addons/base_phone/base_phone.py", line 26, in <module>
    import phonenumbers
ImportError: No module named phonenumbers


Here is command for resolving issue on Linux.

sudo apt-get update
sudo apt-get upgrade
pip install phonenumbers

For other OS you may advice to visit Here

Once you completed download the compressed file , decompress the file and then inside you will see a python file named setup.py. This is the install file of the package, you need to run a command prompt in the folder and execute following line :

python setup.py install


I hope you like this article. Share your views to improve content. Happy Learning !!!

Youtube Video 

1 comment:

  1. I am using Odoo 8 in Windows 8, I installed phonenumbers using pip.
    But odoo says "Unable to install module "base_phone" because an external dependency is not met: No module named phonenumbers".

    I verified phonenumbers installed properly.
    But why this happens in Odoo 8 while installing base_phone module

    Awaiting for your reply

    ReplyDelete

ImportError: cannot import name 'utils' from 'PyPDF2'

Odoo 15: Traceback (most recent call last):   File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner     self...