Showing posts with label import error. Show all posts
Showing posts with label import error. Show all posts

Thursday, 14 August 2025

ModuleNotFoundError: No module named 'psycopg2'

 Odoo 18: 

Traceback (most recent call last):

File "/home/bodedra/odoo18/demo/src/odoo/./odoo-bin", line 5, in <module>

import odoo

File "/home/bodedra/odoo18/demo/src/odoo/odoo/__init__.py", line 49, in <module>

_monkeypatches.patch_all()

File "/home/bodedra/odoo18/demo/src/odoo/odoo/_monkeypatches/__init__.py", line 28, in patch_all

from .lxml import patch_lxml

File "/home/bodedra/odoo18/demo/src/odoo/odoo/_monkeypatches/lxml.py", line 6, in <module>

from odoo.tools import parse_version

File "/home/bodedra/odoo18/demo/src/odoo/odoo/tools/__init__.py", line 10, in <module>

from . import template_inheritance

File "/home/bodedra/odoo18/demo/src/odoo/odoo/tools/template_inheritance.py", line 9, in <module>

from odoo.tools.translate import LazyTranslate

File "/home/bodedra/odoo18/demo/src/odoo/odoo/tools/translate.py", line 35, in <module>

from psycopg2.extras import Json

ModuleNotFoundError: No module named 'psycopg2'


Resolved with

pip3.12 install psycopg2-binary

 

Sunday, 21 June 2015

ImportError: No module named bs4 (BeautifulSoup)

Beautiful Soup is a Python library for pulling data out of HTML and XML files.

Recently face issue with python packages.

Server Traceback:

openerp@odedra-Lenovo-Z50-70:~$ python testing.py
Traceback (most recent call last):
  File "testing.py", line 1, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named bs4

Here is command for resolving issue on Linux.

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

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

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 

Monday, 8 December 2014

ImportError: No module named pooler

In odoo, Many people have problem with pooler import. So here is trackback and below is solution for that.

   Traceback (most recent call last): File "/usr/bin/openerp-server", line 10, in <module> openerp.cli.main()

    File "/usr/lib/pymodules/python2.7/openerp/cli/__init__.py", line 51, in main __import__(m)
    File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 133, in load_module mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
    File "/usr/lib/pymodules/python2.7/openerp/addons/account_test/__init__.py", line 1, in <module> import account_test
    File "/usr/lib/pymodules/python2.7/openerp/addons/account_test/account_test.py", line 32, in <module> import pooler
    ImportError: No module named pooler

Solution:-
 
First go to path location /usr/lib/pymodules/python2.7/openerp/addons/account_test/account_test.py and line number 32

Now replace
    import pooler
to
    from openerp import pooler  
  
Now restart the server.

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

ModuleNotFoundError: No module named 'psycopg2'

  Odoo 18:  Traceback (most recent call last): File "/home/bodedra/odoo18/demo/src/odoo/./odoo-bin", line 5, in ...