Cannot import name 'wrap_module' - odoo

Im setting up an odoo community server and after adding and removing an addon, i am getting an error.
I have tried copying the odoo addons files back to the default install ones with no success.
Exception in thread odoo.service.cron.cron0:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/opt/odoo/odoo/odoo/service/server.py", line 244, in target
self.cron_thread(i)
File "/opt/odoo/odoo/odoo/service/server.py", line 218, in cron_thread
from odoo.addons.base.ir.ir_cron import ir_cron
File "/opt/odoo/odoo/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.__dict__)
File "<string>", line 4, in <module>
File "/opt/odoo/odoo/odoo/addons/base/ir/__init__.py", line 8, in
<module>
from . import ir_actions
File "/opt/odoo/odoo/odoo/addons/base/ir/ir_actions.py", line 8, in
<module>
from odoo.tools import pycompat, wrap_module
ImportError: cannot import name 'wrap_module'
That is the error i am getting, ive tried using pip3 to install pycompat but it still dosnt work.

Make sure you running Odoo on python3,
on terminal python3 path_to_odoo/./odoo-bin
and clear the browser cache and try again.

Related

How do I run pandas on replit

I have a python code for a discord bot. It is working locally but when I try to run it on replit.com I get this error.
Traceback (most recent call last):
File "main.py", line 2, in <module>
import pandas as pd
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/__init__.py", line 48, in <module>
from pandas.core.api import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/api.py", line 48, in <module>
from pandas.core.groupby import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
from pandas.core.groupby.generic import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/groupby/generic.py", line 70, in <module>
from pandas.core.frame import DataFrame
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/frame.py", line 157, in <module>
from pandas.core.generic import NDFrame
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/generic.py", line 152, in <module>
from pandas.core.window import (
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/window/__init__.py", line 1, in <module>
from pandas.core.window.ewm import ( # noqa:F401
File "/home/runner/Animanji/venv/lib/python3.8/site-packages/pandas/core/window/ewm.py", line 12, in <module>
import pandas._libs.window.aggregations as window_aggregations
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
I already installed the packages but didn't work, but it pandas does work on the bash window when I run python3 there.
I couldn't find any solution other than forking another repl and putting my files there.
here is the repl if anyone is interested: https://replit.com/#HourKesh/AppropriateKnobbyInstruction#poetry.lock .
Try going to the replit shell and type pip3 install pandas.

problem in lauching the jupyter notebook from anaconda prompt

I installed tensorflow gpu one day ago at that time it was working fine, but now when I am trying to launch the notebook i am getting following error.
Traceback (most recent call last):
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\lib\site-packages\notebook\notebookapp.py", line 80, in <module>
from .services.contents.manager import ContentsManager
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\lib\site-packages\notebook\services\contents\manager.py", line 17, in <module>
from nbformat import sign, validate as validate_nb, ValidationError
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\lib\site-packages\nbformat\__init__.py", line 32, in <module>
from .validator import validate, ValidationError
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\lib\site-packages\nbformat\validator.py", line 12, in <module>
from .json_compat import get_current_validator, ValidationError
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\lib\site-packages\nbformat\json_compat.py", line 10, in <module>
import jsonschema
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\lib\site-packages\jsonschema\__init__.py", line 14, in <module>
from jsonschema._format import (
File "C:\Users\sumanta\anaconda3\envs\tf_2.5\lib\site-packages\jsonschema\_format.py", line 240, in <module>
#_checks_drafts(draft7="idn-hostname", raises=idna.IDNAError)
AttributeError: module 'idna' has no attribute 'IDNAError'
A very, very basic solution - but what fixed this a while back for me was pip install idna. Give it a shot.

Getting Error while running python3 main.py file

I am getting this error,
/tmp/Python-3.7.5$ python3 main.py
Traceback (most recent call last):
File "main.py", line 3, in <module>
import pandas as pd
File "/home/abc/.local/lib/python3.7/site-packages/pandas/__init__.py", line 51, in <module>
from pandas.core.api import (
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/api.py", line 31, in <module>
from pandas.core.groupby import Grouper, NamedAgg
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 65, in <module>
from pandas.core.frame import DataFrame
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 119, in <module>
from pandas.core import algorithms, common as com, generic, nanops, ops
File "/home/abc/.local/lib/python3.7/site-packages/pandas/core/generic.py", line 112, in <module>
from pandas.io.formats import format as fmt
File "/home/abc/.local/lib/python3.7/site-packages/pandas/io/formats/format.py", line 77, in <module>
from pandas.io.common import stringify_path
File "/home/abc/.local/lib/python3.7/site-packages/pandas/io/common.py", line 3, in <module>
import bz2
File "/usr/local/lib/python3.7/bz2.py", line 19, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
what is the solution?
How did you install your Python? If you've manually built it or used the make command, you might be missing the bz2 library headers.
Try the following...
Centos/Fedora/RHEL:
sudo yum install bzip2-devel
Debian and Ubuntu:
sudo apt-get install libbz2-dev
You'll then either need to rebuild your Python installation or to copy the header in your Python folder, with:
sudo cp /usr/lib/python3.7/lib-dynload/_bz2.cpython-38-x86_64-linux-gnu.so /usr/local/lib/python3.7/

openerp server Import error: there is no module named gevent

I have installed Im module in my system(windows7) and I am trying to start server through
command line using openerp-server --gevent but getting below error
C:\Program Files\OpenERP 7.0-20140118-002423\Server\server>openerp-server --gevent
Traceback (most recent call last):
File "openerp-server", line 2, in <module>
File "C:\Program Files\OpenERP 7.0-20140118-002423\Server\server\.\openerp\__init__.py", line 40, in <module> import cli File "C:\Program Files\OpenERP 7.0-20140118-002423\Server\server\.\openerp\cli\__init__.py", line 3, in <module> import geventImportError: No module named gevent
just install it.
sudo pip install gevent

How to resolve a 'The report "report.custom" already exists!' error while launching OpenERP 7.0

Running Ubuntu 12.04, I try to run OpenERP 7.0, using the latest tarball archive.
wget "http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz"
tar -xzf openerp-7.0-latest.tar.gz
# cd extracted directory
./openerp-server —xmlrpc-port=40069 —netrpc-port=40070 —addons-path=openerp/addons,openerp/web/addons
Here is what I get:
Traceback (most recent call last):
File "./openerp-server", line 5, in <module>
openerp.cli.main()
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/cli/__init__.py", line 51, in main
__import__(m)
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/modules/module.py", line 133, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/addons/account_test/__init__.py", line 2, in <module>
import report
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/addons/account_test/report/__init__.py", line 1, in <module>
import account_test_report
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/addons/account_test/report/account_test_report.py", line 25, in <module>
from report import report_sxw
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/report/__init__.py", line 25, in <module>
import custom
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/report/custom.py", line 623, in <module>
report_custom('report.custom')
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/report/custom.py", line 58, in __init__
report_int.__init__(self, name)
File "/path/to/decrompressed/directory/openerp-7.0-20140113-001013/openerp/report/interface.py", line 45, in __init__
assert not self.exists(name), 'The report "%s" already exists!' % name
AssertionError: The report "report.custom" already exists!
I already successfully runned a 6.0 instance on this same machine, this server is not running while I try to launch the 7.0 version though. I don't know if that may be related to the fact I already installed the 6.0 before. Could it be a PostgreSQL problem? I didn't drop the existing 6.0 database.
Running the server without more parameters seems to work:
./openerp-server
2014-01-13 14:26:35,270 1014 INFO ? openerp: OpenERP version 7.0-20140113-001013
…