DeprecationWarning: distutils Version classes are deprecated while starting odoo15 on local - terminal

I installed odoo 15 on my local and installed all the dependances, but when i start my server it shows me a py warning and i am unable to solve this issue, any help will be much appreciated, the warning i am getting in my local is below:
2022-01-11 10:26:54,032 8202 WARNING ? py.warnings:
/home/itachi/Workspace/odoo_15/core/odoo/addons/base/models/ir_actions_report.py:68:
DeprecationWarning: distutils Version classes are deprecated. Use
packaging.version instead.
File "core/odoo-bin", line 8, in
odoo.cli.main() File "/home/itachi/Workspace/odoo_15/core/odoo/cli/command.py", line 61, in
main
o.run(args)
File "/home/itachi/Workspace/odoo_15/core/odoo/cli/server.py", line 176, in
run
main(args)
File "/home/itachi/Workspace/odoo_15/core/odoo/cli/server.py", line 170, in
main
rc = odoo.service.server.start(preload=preload, stop=stop)
File "/home/itachi/Workspace/odoo_15/core/odoo/service/server.py", line
1286, in start
load_server_wide_modules()
File "/home/itachi/Workspace/odoo_15/core/odoo/service/server.py", line
1196, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m)
File "/home/itachi/Workspace/odoo_15/core/odoo/modules/module.py", line
396, in load_openerp_module
import('odoo.addons.' + module_name)
File "/home/itachi/Workspace/odoo_15/core/odoo/addons/base/init.py",
line 5, in
from . import models File "/home/itachi/Workspace/odoo_15/core/odoo/addons/base/models/init.py",
line 13, in
from . import ir_actions_report
File "/home/itachi/Workspace/odoo_15/core/odoo/addons/base/models/ir_actions_report.py",
line 68, in
if LooseVersion(version) < LooseVersion('0.12.0'):
2022-01-11 10:26:54,033 8202 WARNING ? py.warnings:
/home/itachi/Workspace/odoo_15/core/odoo/addons/base/models/ir_actions_report.py:73:
DeprecationWarning: distutils Version classes are deprecated. Use
packaging.version instead. File "core/odoo-bin", line 8, in
odoo.cli.main()
File "/home/itachi/Workspace/odoo_15/core/odoo/cli/command.py", line 61, in
main
o.run(args)
File "/home/itachi/Workspace/odoo_15/core/odoo/cli/server.py", line 176, in
run
main(args)
File "/home/itachi/Workspace/odoo_15/core/odoo/cli/server.py", line 170, in
main
rc = odoo.service.server.start(preload=preload, stop=stop)
File "/home/itachi/Workspace/odoo_15/core/odoo/service/server.py", line
1286, in start
load_server_wide_modules() File "/home/itachi/Workspace/odoo_15/core/odoo/service/server.py", line
1196, in load_server_wide_modules
odoo.modules.module.load_openerp_module(m) File "/home/itachi/Workspace/odoo_15/core/odoo/modules/module.py", line
396, in load_openerp_module
import('odoo.addons.' + module_name) File "/home/itachi/Workspace/odoo_15/core/odoo/addons/base/init.py",
line 5, in
from . import models File "/home/itachi/Workspace/odoo_15/core/odoo/addons/base/models/init.py",
line 13, in
from . import ir_actions_report File "/home/itachi/Workspace/odoo_15/core/odoo/addons/base/models/ir_actions_report.py",
line 73, in
if LooseVersion(version) >= LooseVersion('0.12.2'):
2022-01-11 10:26:54,154 8202 WARNING ? odoo.addons.base.models.res_currency: The
num2words python library is not installed, amount-to-text features
won't be fully available. 2022-01-11 10:26:54,181 8202 INFO ?
odoo.service.server: HTTP service (werkzeug) running on
Uchiha-Madara:8069

This issue has been fixed in this pull request and you need yo update your Odoo to latest version to fix it.

Related

unable to create executable using Py2exe, throwing error as mentioned below

Hi I'm trying to make an executable using py2exe, I checked my script but cannot find the actual issue why below error is keep getting pop-up during building of exe
Building 'dist\py.exe'.
Traceback (most recent call last):
File "C:\Users\User\PycharmProjects\Test\pyexe\setup.py", line 15, in <module>
freeze(
File "C:\Python39\lib\site-packages\py2exe\__init__.py", line 176, in freeze
builder.build()
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 254, in build
self.build_archive(exe_path)
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 479, in build_archive
base = dist_path.rsplit('\\', 1)[0]
AttributeError: 'NoneType' object has no attribute 'rsplit'
Below is my setup.py script
from py2exe import freeze
from py_version import VERSION, DESCRIPTION # This is my own script
freeze(
console=[{"script": "py.py"}],
options={
"py2exe": {
"dist_dir": "dist",
"bundle_files": 1, # bundle as much as possible
"compressed": True,
}},
version_info={"version":VERSION,
"description":DESCRIPTION,
"company_name":"Priyanshu Kumar",
"copyright":"Opensource, credit goes to David Manthey",
"product_name":"Stand-Alone Python3 Interpreter",
"product_version":VERSION},
zipfile=None)
UPDATE:
I was searching on google for help and found that it should be <<<zipfile="None">>> instead of <<<zipfile=None>>>.
I changed it in my code but now got new error
Traceback (most recent call last):
File "C:\Users\User\PycharmProjects\Test\pyexe\setup.py", line 29, in <module>
options={
File "C:\Python39\lib\site-packages\py2exe\__init__.py", line 176, in freeze
builder.build()
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 273, in build
self.build_archive(libpath, delete_existing_resources=True)
File "C:\Python39\lib\site-packages\py2exe\runtime.py", line 397, in build_archive
resource.add(type=os.path.basename(pydll), name=1, value=pydll_bytes)
File "C:\Python39\lib\site-packages\py2exe\resources.py", line 49, in add
raise WindowsError(details) from None
OSError: [WinError 87] The parameter is incorrect.
Press any key to continue . . .

How to fix this this error in `pip-9.03` and `python-2.6`

I installed python-2.6 and then setuptools and finally pip-9.0.3 on my machine.I added the path of pip in my PATH variable.now when i type pip in my cmd, it returns this error.
C:\Users\Asus>pip
Traceback (most recent call last):
File "C:\Python26\Scripts\pip-script.py", line 11, in <module>
load_entry_point('pip==9.0.3', 'console_scripts', 'pip')()
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 572, in load_
entry_point
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 2769, in load
_entry_point
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 2422, in load
File "build\bdist.win-amd64\egg\pkg_resources\__init__.py", line 2428, in reso
lve
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\__init__.py", line
45, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\vcs\mercurial.py",
line 9, in <module>
from pip.download import path_to_url
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\download.py", line
37, in <module>
from pip.utils.ui import DownloadProgressBar, DownloadProgressSpinner
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\utils\ui.py", line
57, in <module>
_BaseBar = _select_progress_class(IncrementalBar, Bar)
File "C:\Python26\lib\site-packages\pip-9.0.3-py2.6.egg\pip\utils\ui.py", line
50, in _select_progress_class
six.text_type().join(characters).encode(encoding)
LookupError: unknown encoding: cp720
unfortunately this website www.pypi.org is unavailable in my country if that's the reason of the problem.

Exception when running Scrapy tutorial on Mac OS X

I'm trying to learn Scrapy, and I'm running it on Mac OS X 10.11.2.
I'm following the tutorial, I've download the tutorial files and created a new Spider file as described here: http://doc.scrapy.org/en/1.0/intro/tutorial.html
When I try to run the spider, I get the following exception:
2015-12-11 19:04:05 [scrapy] INFO: Scrapy 1.0.3 started (bot: tutorial)
2015-12-11 19:04:05 [scrapy] INFO: Optional features available: ssl, http11
2015-12-11 19:04:05 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'tutorial.spiders', 'SPIDER_MODULES': ['tutorial.spiders'], 'BOT_NAME': 'tutorial'}
2015-12-11 19:04:06 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, LogStats, CoreStats, SpiderState
Unhandled error in Deferred:
2015-12-11 19:04:06 [twisted] CRITICAL: Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/scrapy/cmdline.py", line 150, in _run_command
cmd.run(args, opts)
File "/usr/local/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 57, in run
self.crawler_process.crawl(spname, **opts.spargs)
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 153, in crawl
d = crawler.crawl(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1274, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 71, in crawl
self.engine = self._create_engine()
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 83, in _create_engine
return ExecutionEngine(self, lambda _: self.stop())
File "/usr/local/lib/python2.7/site-packages/scrapy/core/engine.py", line 64, in __init__
self.scheduler_cls = load_object(self.settings['SCHEDULER'])
File "/usr/local/lib/python2.7/site-packages/scrapy/utils/misc.py", line 44, in load_object
mod = import_module(module)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/site-packages/scrapy/core/scheduler.py", line 6, in <module>
from queuelib import PriorityQueue
File "/usr/local/lib/python2.7/site-packages/queuelib/__init__.py", line 1, in <module>
from queuelib.queue import FifoDiskQueue, LifoDiskQueue
File "/usr/local/lib/python2.7/site-packages/queuelib/queue.py", line 5, in <module>
import sqlite3
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>
from _sqlite3 import *
exceptions.ImportError: No module named _sqlite3
2015-12-11
19:04:06 [twisted] CRITICAL:
Initially I tought that I had a problem in my sqlite installation but it seems to be working if I run the command sqlite3 from the command line. Any ideas?
Apparently this iss a known homebrew problem, see here
I think you should reinstall homebrew's sqlite and python

openshift-ansible fails since 2 days with No module named OpenSSL.crypto

since doing the latest pull after the 1.07 release to the ansible github repository, it seems to be failing during the install phase.
example:
ansible-playbook playbooks/byo/config.yml
returns with:
Traceback (most recent call last):
File "/bin/ansible-playbook", line 324, in <module>
sys.exit(main(sys.argv[1:]))
File "/bin/ansible-playbook", line 264, in main
pb.run()
File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 310, in run
play = Play(self, play_ds, play_basedir, vault_password=self.vault_password)
File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 124, in __init__
ds = template(basedir, ds, temp_vars)
File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 140, in template
d[k] = template(basedir, v, templatevars, lookup_fatal, depth, expand_lists, convert_bare, fail_on_undefined, filter_fatal)
File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 140, in template
d[k] = template(basedir, v, templatevars, lookup_fatal, depth, expand_lists, convert_bare, fail_on_undefined, filter_fatal)
File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 124, in template
varname = template_from_string(basedir, varname, templatevars, fail_on_undefined)
File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 346, in template_from_string
environment.filters.update(_get_filters())
File "/usr/lib/python2.7/site-packages/ansible/utils/template.py", line 54, in _get_filters
plugins = [ x for x in utils.plugins.filter_loader.all()]
File "/usr/lib/python2.7/site-packages/ansible/utils/plugins.py", line 232, in all
self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path)
File "/root/cluster/openshift-ansible/filter_plugins/oo_filters.py", line 10, in <module>
import OpenSSL.crypto
ImportError: No module named OpenSSL.crypto
This was working fine a couple of days ago, before the pull so I have the feeling something in the repository caused this change.
Any ideas?
thx
Reason for this error, that apparently since a couple of days ansible-openshift depends on another additional module, which was not listed in the requirements or is not installed automatically.
executing:
yum install -y pyOpenSSL
seems to fix this issue for now.
Or you can try pip install pyopenssl

Google Apis Client Generator Python Not Running

I'm trying to execute Google APIs Client Generator to build new ADMIN-SDK for Java Language however I'm stuck in the generator, I've tried step by step using python2.6 and python2.7 both had similar outputs.
$ python $(/bin/pwd)/googleapis/codegen/generate_library.py --api_name=plus --api_version=v1 --language=java --output_dir=/tmp/gen --language=java
Traceback (most recent call last): File
"/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/generate_library.py",
line 245, in
app.run() File "/Library/Python/2.7/site-packages/google_apputils-0.3.0-py2.7.egg/google/apputils/app.py",
line 216, in run
return _actual_start() File "/Library/Python/2.7/site-packages/google_apputils-0.3.0-py2.7.egg/google/apputils/app.py",
line 244, in _actual_start
really_start() File "/Library/Python/2.7/site-packages/google_apputils-0.3.0-py2.7.egg/google/apputils/app.py",
line 203, in really_start
sys.exit(main(argv)) File "/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/generate_library.py",
line 152, in main
language_variant=FLAGS.language_variant) File "/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/generate_library.py",
line 179, in Generate
language_variations = Targets().VariationsForLanguage(language) File
"/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/targets.py",
line 68, in init
files.GetFileContents(self.targets_path)) File "/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/json_with_comments.py",
line 54, in Loads
return json.loads(stripped, **kw) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py",
line 326, in loads
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
line 366, in decode File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
line 382, in raw_decode ValueError: Expecting property name: line 9
column 9 (char 198)
Any ideas?
You may have to specify --language_variant=XXX, where XXX is one of the directory names under .../templates/java

Resources