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

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
…

Related

Vosk in Windows 10

I need help in using Vosk in Windows 10. I installed python 3.8, then used the pip install vosk command. The Python installation is at C:\Users\kamal\AppData\Local\Programs\Python\Python38 and I can see that vosk is at C:\Users\kamal\AppData\Local\Programs\Python\Python38\Lib\site-packages\vosk. Next, I cloned the vosk git at C:\Users\kamal\vosk-api (kamal is my username). Then, I downloaded the en-us model and placed it in C:\Users\kamal\vosk-api\python\example\model. Next, in cmd, I went to the C:\Users\kamal\vosk-api\python\example directory and ran the command python ./test_srt.py test.wav test.txt. I am getting the following messages:
File "./test_srt.py", line 12, in <module>
model = Model(lang="en-us")
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 50, in __init__
model_path = self.get_model_path(model_name, lang)
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 63, in get_model_path
model_path = self.get_model_by_lang(lang)
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 97, in get_model_by_lang
self.download_model(Path(directory, result_model[0]))
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 102, in download_model
MODEL_DIRS[3].mkdir()
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\pathlib.py", line 1288, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\kamal\\.cache\\vosk'
Exception ignored in: <function Model.__del__ at 0x0000022E05867D30>
Traceback (most recent call last):
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 56, in __del__
_c.vosk_model_free(self._handle)
AttributeError: 'Model' object has no attribute '_handle'
What has to be done?

Cannot import name 'wrap_module'

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.

VirtualEnv tensorflow with Nvidia GPU : cuda-9.0-vs-cuda-8.0, cuDNN-7.0-vs-cuDNN-6.0

Today I installed tensorflow using the RTFM tensorflow dot org install linux,
I installed the VirtualEnv + Python3 + CPU and tested tensorflow Hello World, which worked fine.
Then I went on the nvidia path (GPU GTX 970) to install VirtualEnv + Python + GPU. RTFM (docs dot nvidia dot com cuda cuda-installation-guide-linux index dot html) , cuda-9.0, cuDDN 7, all PATH's are okay, .bashrc up-to-date, printenv LD_LIBRARY_PATH ok.
My GPU has been ok with the cuda scripts deviceQuery and bandwitdhTest. All post-installation-actions from the Nvidia checklist passed.
When I run Hello World in VirtualEnv+Python3+GPU, code below is what I get (cliffnote : tensorflow wants to use some cudalibrary-8.0 from the /usr/local/cuda-9.0/lib64 which is a 9.0 directory. I tried to add a symlink so cudalibrary-8.0 points to 9.0, but then I get the same message with another cudalibrary... doing this trick for all the cuda libraries is not what I call a fix ;-) )
alexandre#Martin-2:~/Documents/Ordinateur/VirtualEnv$ source tensorflow_py3_gpu/bin/activate
(tensorflow_py3_gpu) alexandre#Martin-2:~/Documents/Ordinateur/VirtualEnv$ python
Python 3.5.2 (default, Sep 14 2017, 22:51:06) [GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> # Python
... import tensorflow as tf
Traceback (most recent call last):
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory
Last line above is about the cudalibrary-8.0 that obviously is NOT in the list of the cudalibrary-9.0. Below is the rest of it.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/alexandre/Documents/Ordinateur/VirtualEnv/tensorflow_py3_gpu/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
See https tensorflow dot org slash install slash install_sources hashtag common_installation_problems for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
>>> hello = tf.constant('Hello, TensorFlow!')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'tf' is not defined
>>> sess = tf.Session()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'tf' is not defined
>>> print(sess.run(hello))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'sess' is not defined
>>> quit()
(tensorflow_py3_gpu) alexandre#Martin-2:~/Documents/Ordinateur/VirtualEnv$ deactivate`
--
Next day update
Not so clean fix : Create a link in /usr/local/cuda/lib64/ for every library with the wrong number version, linked to the right number version.
alexandre#Martin-2:/usr/local/cuda/lib64$ sudo ln -s libcurand.so.9.0 libcurand.so.8.0
I did this with five cuda libraries (libcusolver, libcublas, libcudart, libcurand, libcufft) and with the cuDNN library libcudnn (version 6 --> version 7).
Hello world! tensorflow worked... but if someone can tell me why tensorflow calls cuda-8.0 and cuDDN-6.0 libraries when I only installed cuda-9.0 and cuDDN-7.0, you're very welcome.
[SOLVED... OR NEARLY] UPDATE
I found https://github.com/tensorflow/tensorflow/issues/12052 that explains almost it all.
Cliffnote :
tensorflow-1.3 uses cuda-8.0 and cuDNN-6.0 (this is why these libraries are linked explicitly when I run tensorflow). I got tricked on the nvidia site that made me download the cuda-9.0 and cuDNN-7.0 versions, which will not be implemented in tensorflow-1.3.
tensorflow-1.4 will work with the cuda-9.0 and cuDNN-7.0 versions. tensorflow-1-4 may be available sometime in October 2017 (or anytime soon, check the link above).
Have you tried
sudo apt install cuda-8-0
?
It should download packages from http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604
Along with installing cudnn6 (the same way I installed cudnn7), it worked for me.

ImportError: DLL load failed pyinstaller

I create .exe file wiht pyinstaller and when I try to start it such error occured:
C:\pyinstaller-develop>C:\pyinstaller-develop\RichardINC_aws\dist\RichardINC_aws.exe
Traceback (most recent call last):
File "", line 8, in
File "C:\pyinstaller-develop\PyInstaller\loader\pyimod03_importers.py",line
3
64, in load_module
exec(bytecode, module.dict)
File "C:\Python27\lib\site-packages\pillow-3.0.0-py2.7-win32.egg\PIL\Image.py"
,line 66, in
File "C:\pyinstaller-develop\PyInstaller\loader\pyimod03_importers.py",
line 364, in load_module
exec(bytecode, module.dict)
File "C:\Python27\lib\site-packages\pillow-3.0.0-py2.7-win32.egg\PIL_imaging.py",
line 7, in
File "C:\Python27\lib\site-packages\pillow-3.0.0-py2.7-win32.egg\PIL_imaging.py",
line 6, in bootstrap
ImportError: DLL load failed: ═х эрщфхэ єърчрээ√щ ьюфєы№.
RichardINC_aws returned -1
Maybe this thread on Github involving what seems to be a pyinstaller developer could help. I'm having a similar problem with both 32-bit and 64-bit versions of Python 3.5.1 for Windows but not with pyinstaller for python 3.4.2 in Debian (although the latter creates standalones that won't run in my 64-bit Windows but run fine in Linux).

Error setup powerline for bash shell on Yosemite

I would like to use powerline with bash (not zsh if possible) but I have faced some errors, below are steps I have been through
I recently install python using homebrew
I have also executed brew linkapps python
I have installed powerline-statys using pip install powerline-status
I have extended my ~/.bash_profile
if [ -f /usr/local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh ]; then
source /usr/local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh
fi
I also have installed patched fonts from https://github.com/powerline/fonts using it's install.sh
After Opennig new tab in iTerm2 I have faced this error, I think it's about python but I have no ideas how to fix it, so please help
traceback (most recent call last):
File "/usr/local/bin/powerline-config", line 6, in <module>
from powerline.commands.config import get_argparser
File "/usr/local/lib/python2.7/site-packages/powerline/commands/config.py", line 6, in <module>
import powerline.bindings.config as config
File "/usr/local/lib/python2.7/site-packages/powerline/bindings/config.py", line 19, in <module>
from powerline.commands.main import finish_args
File "/usr/local/lib/python2.7/site-packages/powerline/commands/main.py", line 17, in <module>
encoding = get_preferred_arguments_encoding()
File "/usr/local/lib/python2.7/site-packages/powerline/lib/encoding.py", line 77, in get_preferred_arguments_encoding
locale.getdefaultlocale()[1]
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Traceback (most recent call last):
File "/usr/local/bin/powerline-config", line 6, in <module>
from powerline.commands.config import get_argparser
File "/usr/local/lib/python2.7/site-packages/powerline/commands/config.py", line 6, in <module>
import powerline.bindings.config as config
File "/usr/local/lib/python2.7/site-packages/powerline/bindings/config.py", line 19, in <module>
from powerline.commands.main import finish_args
File "/usr/local/lib/python2.7/site-packages/powerline/commands/main.py", line 17, in <module>
encoding = get_preferred_arguments_encoding()
File "/usr/local/lib/python2.7/site-packages/powerline/lib/encoding.py", line 77, in get_preferred_arguments_encoding
locale.getdefaultlocale()[1]
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
My Environment
python --version
Python 2.7.6
brew list python
/usr/local/Cellar/python/2.7.10_2/bin/2to3
/usr/local/Cellar/python/2.7.10_2/bin/2to3-2
/usr/local/Cellar/python/2.7.10_2/bin/2to3-2.7
/usr/local/Cellar/python/2.7.10_2/bin/easy_install
/usr/local/Cellar/python/2.7.10_2/bin/easy_install-2.7
/usr/local/Cellar/python/2.7.10_2/bin/idle
/usr/local/Cellar/python/2.7.10_2/bin/idle2
/usr/local/Cellar/python/2.7.10_2/bin/idle2.7
/usr/local/Cellar/python/2.7.10_2/bin/pip
/usr/local/Cellar/python/2.7.10_2/bin/pip2
/usr/local/Cellar/python/2.7.10_2/bin/pip2.7
/usr/local/Cellar/python/2.7.10_2/bin/pydoc
/usr/local/Cellar/python/2.7.10_2/bin/pydoc2
/usr/local/Cellar/python/2.7.10_2/bin/pydoc2.7
/usr/local/Cellar/python/2.7.10_2/bin/python
/usr/local/Cellar/python/2.7.10_2/bin/python-config
/usr/local/Cellar/python/2.7.10_2/bin/python2
/usr/local/Cellar/python/2.7.10_2/bin/python2-config
/usr/local/Cellar/python/2.7.10_2/bin/python2.7
/usr/local/Cellar/python/2.7.10_2/bin/python2.7-config
/usr/local/Cellar/python/2.7.10_2/bin/pythonw
/usr/local/Cellar/python/2.7.10_2/bin/pythonw2
/usr/local/Cellar/python/2.7.10_2/bin/pythonw2.7
/usr/local/Cellar/python/2.7.10_2/bin/smtpd.py
/usr/local/Cellar/python/2.7.10_2/bin/smtpd2.7.py
/usr/local/Cellar/python/2.7.10_2/bin/smtpd2.py
/usr/local/Cellar/python/2.7.10_2/bin/wheel
/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/ (3761 files)
/usr/local/Cellar/python/2.7.10_2/IDLE.app/Contents/ (8 files)
/usr/local/Cellar/python/2.7.10_2/lib/pkgconfig/ (3 files)
/usr/local/Cellar/python/2.7.10_2/libexec/pip/ (499 files)
/usr/local/Cellar/python/2.7.10_2/libexec/setuptools/ (227 files)
/usr/local/Cellar/python/2.7.10_2/libexec/wheel/ (92 files)
/usr/local/Cellar/python/2.7.10_2/Python Launcher.app/Contents/ (17 files)
/usr/local/Cellar/python/2.7.10_2/share/man/ (3 files)
/usr/local/Cellar/python/2.7.10_2/share/python/ (315 files)
Your python complains about the unknown locale UTF-8. Searching the net gives the following solution. Add these lines to your ~/.bash_profile:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8