Replies: 4 comments 7 replies
-
If I'm reading the traceback right the issue seems to be in your Python 3.8.12 build, pip is not able to connect using ssl/tls due to pip not passing certificate validation information to ssl.py under urllib3. I am using Netbox 3.x on CentOS 7 but did not build Python from scratch, the CentOS SCL (Software Collection) repo has a python38 build available in /opt/rh/rh-python38 that works just fine (using the Ansible lae.netbox playbook to manage Netbox releases/config).
You didn't mention this but you need to do a stepwise upgrade to 2.11.x first before upgrading to 3.x for versions 2.10 and older. 3.x releases don't include the older database schema updates, to make the install and upgrade process more efficient for current installs. It says this in the release notes for 3.x but I quickly skimmed the README.md and /static/docs/installation/upgrading/ docs and didn't see it referenced, although I may have just missed it, I think a number of other admins also weren't following along around the 3.x release and missed the memo as well.
It makes sense to have a specific error message in the upgrade script which checks for db version and links to the URL for the upgrade docs for 2.11, similar to the error message for unsupported Python version. I'm not sure how that would be done, you'd need to connect to the db to check the db schmea version, which means loading settings.py to get the connection information and the django orm core, the first time this happens in upgrade.sh is the call to migrate, which is going to error out but may have not the most helpful targeted message (although I didn't check), leading to more questions on the mailing list.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: AnderAbc ***@***.***>
Sent: Thursday, October 27, 2022 7:42 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Upgrade netbox : pip install not works from v.2.8.6 (Discussion #10772)
I have old running ver. 2.8.6. on CentOS 7,
I have upgraded python from 2.6. to 2.8 to meet prerequisites. Python compiled from source.
I tried to upgrade netbox to current v. 3.3.6, but when I run ./upgrade I got this errors
./upgrade.sh
Using Python 3.8.12
Creating a new virtual environment at /opt/netbox-3.3.6/venv...
Updating pip (pip install --upgrade pip)...
Requirement already satisfied: pip in ./venv/lib/python3.8/site-packages (21.1.1)
ERROR: Exception:
Traceback (most recent call last):
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 180, in _main
status = self.run(options, args)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 204, in wrapper
return func(self, options, args)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 318, in run
requirement_set = resolver.resolve(
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 127, in resolve
result = self._result = resolver.resolve(
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 473, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 341, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _merge_into_criterion
if not criterion.candidates:
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py", line 139, in __bool__
return bool(self._sequence)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in __bool__
return any(self)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 129, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 74, in _iter_built_with_inserted
for version, func in infos:
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 258, in iter_index_candidate_infos
result = self._finder.find_best_candidate(
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 879, in find_best_candidate
candidates = self.find_all_candidates(project_name)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 824, in find_all_candidates
page_candidates = list(page_candidates_it)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/index/sources.py", line 134, in page_candidates
yield from self._candidates_from_page(self._link)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 783, in process_project_url
html_page = self._link_collector.fetch_page(project_url)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 512, in fetch_page
return _get_html_page(location, session=self.session)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 422, in _get_html_page
resp = _get_html_response(url, session=session)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 120, in _get_html_response
resp = session.get(
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_internal/network/session.py", line 449, in request
return super().request(method, url, *args, **kwargs)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/cachecontrol/adapter.py", line 53, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/urllib3/connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/urllib3/connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/urllib3/connection.py", line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/urllib3/connection.py", line 500, in _connect_tls_proxy
return ssl_wrap_socket(
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/urllib3/util/ssl_.py", line 432, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "/opt/netbox-3.3.6/venv/lib/python3.8/site-packages/pip/_vendor/urllib3/util/ssl_.py", line 474, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "/usr/local/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/lib/python3.8/ssl.py", line 997, in _create
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname
—
Reply to this email directly, view it on GitHub<#10772>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM7WHU5OEQRIDAMC6RTWFJ2E5ANCNFSM6AAAAAARQATEFY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I am not running pip behind a proxy in my install (aside from Apache being in _front_ of the Netbox uWSGI service) but I think https_proxy and http_proxy might both need to be set. Looks like there is a pip config file where proxy settings can also live.
https://stackoverflow.com/questions/43473041/how-to-configure-pip-per-config-file-to-use-a-proxy-with-authentification
The error message also linked to a URL which describes exactly how to set proxy config in the environment that works with python urllib3
https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: AnderAbc ***@***.***>
Sent: Thursday, October 27, 2022 11:32 AM
To: netbox-community/netbox ***@***.***>
Cc: Mark Tinberg ***@***.***>; Comment ***@***.***>
Subject: Re: [netbox-community/netbox] Upgrade netbox : pip install not works from v.2.8.6 (Discussion #10772)
Aaah, you have right, I forget that my version 2.8.3 is lower then 2.11 :)
I just tried your hint with python install via CentOS SCL and yep looks better now. :)
I was searching all day today : how install python 38 on Cent7 and I only got responses with compile.....
One more question: Installation is now complaining proxy settings: I am connected via HTTPS proxy, but how can I setup this here ?
I exported in /etc/enviroment,
also export http_proxy=https://my_proxy not works for me.
./upgrade.sh
Using Python 3.8.13
Creating a new virtual environment at /opt/netbox-3.3.6/venv...
Updating pip (pip install --upgrade pip)...
Collecting pip
Downloading https://files.pythonhosted.org/packages/47/ef/8b5470b5b94b36231ed9c0bde90caa71c0d4322d4a15f009b2b7f4287fe0/pip-22.3-py3-none-any.whl (2.1MB)
|████████████████████████████████| 2.1MB 563kB/s
Installing collected packages: pip
Found existing installation: pip 19.3.1
Uninstalling pip-19.3.1:
Successfully uninstalled pip-19.3.1
Successfully installed pip-22.3
pip 22.3 from /opt/netbox-3.3.6/venv/lib64/python3.8/site-packages/pip (python 3.8)
Installing Python system packages (pip install wheel)...
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1131)')))': /simple/wheel/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1131)')))': /simple/wheel/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1131)')))': /simple/wheel/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1131)')))': /simple/wheel/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:1131)')))': /simple/wheel/
ERROR: Could not find a version that satisfies the requirement wheel (from versions: none)
ERROR: No matching distribution found for wheel
***@***.*** netbox]#
—
Reply to this email directly, view it on GitHub<#10772 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM4AGDPSMBPTSXB3AZ3WFKVCTANCNFSM6AAAAAARQATEFY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/markupsafe/__init__.py)
I haven't confirmed but it's likely that you need to manually update the requirements.txt file and specify an older version of MarkupSafe or something. The Netbox team doesn't use pip freeze to create pinned version dependencies in the requirements file, pip will try and install the latest available, but when installing an older release that may bring in newer versions of dependencies which are longer are compatible. This doesn't affect new deployments (as much) as everyone is getting close to the same versions, but the further back in time you go the more likely one of the libraries will have changed their API in an incompatible way.
There may be a note in the Release notes for either Netbox or MarkupSafe that mentions this when it happened, if this is what the problem is, if you want to go spelunking for it.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: AnderAbc ***@***.***>
Sent: Friday, October 28, 2022 10:08 AM
To: netbox-community/netbox ***@***.***>
Cc: Mark Tinberg ***@***.***>; Comment ***@***.***>
Subject: Re: [netbox-community/netbox] Upgrade netbox : pip install not works from v.2.8.6 (Discussion #10772)
Hello
One update : I had to change OS to RH7.9, because in production we have RH 7 and I am going to replicate netbox.
Anyway I am almost at the same point :)
Also I am now trying to upgrade first to version 2.11.0 as is recommended.
Reg. proxy issue I realized that (don't know why ) this new pip v.22.3 is not working with proxy, even I exported proxy or used --proxy option....
You can see in my previous post that the script at beginning with old pip v.9.x pkg was downloaded OK, but with new pip 22.x got error.....
Nevermind, I removed this line from the upgrade script pip install --upgrade pip and script continue execution...
I tried to upgrade with 2 options : with old python36 and with new python38, however both failed :(
1. in first with python36 upgrade script ended with this error
# ./upgrade.sh
Removing old virtual environment...
Creating a new virtual environment at /opt/netbox-2.11.0/venv...
Updating pip ()...
pip 9.0.3 from /opt/netbox-2.11.0/venv/lib64/python3.6/site-packages (python 3.6)
Installing Python system packages (pip install wheel)...
Collecting wheel
Using cached https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.37.1
You are using pip version 9.0.3, however version 22.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Installing core dependencies (pip install -r requirements.txt)...
Collecting Django==3.2 (from -r requirements.txt (line 1))
..........
Applying virtualization.0016_replicate_interfaces...
Replicating 988 VM interfaces...
Replicating assigned objects...
0/988 (0%)
OK
.......
Retracing 1 cabled power outlets...
[####################] 100%
Retraced 1 power outlets
Retracing 1 cabled power ports...
[####################] 100%
Retraced 1 power ports
Finished.
Collecting static files (python3 netbox/manage.py collectstatic --no-input)...
/opt/netbox-2.11.0/netbox/netbox/settings.py:35: UserWarning: Support for Python 3.6 will be dropped in NetBox v2.12. Please upgrade to Python 3.7 or later at your earliest convenience.
"Support for Python 3.6 will be dropped in NetBox v2.12. Please upgrade to Python 3.7 or later at your "
957 static files copied to '/opt/netbox-2.11.0/netbox/static'.
Removing stale content types (python3 netbox/manage.py remove_stale_contenttypes --no-input)...
/opt/netbox-2.11.0/netbox/netbox/settings.py:35: UserWarning: Support for Python 3.6 will be dropped in NetBox v2.12. Please upgrade to Python 3.7 or later at your earliest convenience.
"Support for Python 3.6 will be dropped in NetBox v2.12. Please upgrade to Python 3.7 or later at your "
Traceback (most recent call last):
File "netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/contrib/contenttypes/management/commands/remove_stale_contenttypes.py", line 83, in handle
ct.delete()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/db/models/base.py", line 954, in delete
return collector.delete()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/db/models/deletion.py", line 436, in delete
sender=model, instance=obj, using=self.using
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/cacheops/transaction.py", line 76, in __exit__
self._no_monkey.__exit__(self, exc_type, exc_value, traceback)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/db/transaction.py", line 290, in __exit__
connection.set_autocommit(True)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/db/backends/base/base.py", line 420, in set_autocommit
self.run_and_clear_commit_hooks()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/django/db/backends/base/base.py", line 653, in run_and_clear_commit_hooks
func()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/cacheops/transaction.py", line 30, in commit
func(*args, **kwargs)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/funcy/decorators.py", line 66, in __call__
return self._func(*self._args, **self._kwargs)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/funcy/decorators.py", line 45, in wrapper
return deco(call, *dargs, **dkwargs)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/cacheops/redis.py", line 17, in handle_connection_failure
return call()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/funcy/decorators.py", line 66, in __call__
return self._func(*self._args, **self._kwargs)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/cacheops/invalidation.py", line 26, in invalidate_dict
json.dumps(obj_dict, default=str)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/commands/core.py", line 5710, in __call__
return client.evalsha(self.sha, len(keys), *args)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/commands/core.py", line 5095, in evalsha
return self._evalsha("EVALSHA", sha, numkeys, *keys_and_args)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/commands/core.py", line 5079, in _evalsha
return self.execute_command(command, sha, numkeys, *keys_and_args)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/client.py", line 1242, in execute_command
lambda error: self._disconnect_raise(conn, error),
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/client.py", line 1240, in <lambda>
conn, command_name, *args, **options
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/client.py", line 1215, in _send_command_parse_response
return self.parse_response(conn, command_name, **options)
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/client.py", line 1254, in parse_response
response = connection.read_response()
File "/opt/netbox-2.11.0/venv/lib64/python3.6/site-packages/redis/connection.py", line 839, in read_response
raise response
redis.exceptions.ResponseError: Error running script (call to f_0605214935a9ffcd4b9e5779300302540ff08da4): @user_script:36: @user_script: 36: Unknown Redis command called from Lua script
(venv) ***@***.*** netbox]#
with 2nd option python38 script failed "sooner" after starting Applying database migrations...
# ./upgrade.sh
Removing old virtual environment...
Creating a new virtual environment at /opt/netbox-2.11.0/venv...
Updating pip ()...
pip 19.3.1 from /opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/pip (python 3.8)
Installing Python system packages (pip install wheel)...
Collecting wheel
Downloading https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl
Installing collected packages: wheel
...
Building wheels for collected packages: django-pglocks, coreschema
Building wheel for django-pglocks (setup.py) ... done
Created wheel for django-pglocks: filename=django_pglocks-1.0.4-cp38-none-any.whl size=3860 sha256=c45ad09c7807b359f97945b81737168b3e9bdcd020879f34716cc6005d2eb0fc
Stored in directory: /root/.cache/pip/wheels/52/36/e4/91f6930d10b2d715454ec59ded09c9e9af7b667ef557fb19ee
Building wheel for coreschema (setup.py) ... done
Created wheel for coreschema: filename=coreschema-0.0.4-cp38-none-any.whl size=15033 sha256=e3c6e54359163456ec828ea307153cf26c31c0db3c5d10c904e6fbe2e50909b5
Stored in directory: /root/.cache/pip/wheels/10/7b/ba/04fcd6b33e6123ca11a5f5ab56decb1a2d87ced028377a1377
Successfully built django-pglocks coreschema
Installing collected packages: pytz, asgiref, sqlparse, Django, funcy, six, pyparsing, packaging, wrapt, deprecated, async-timeout, redis, django-cacheops, django-cors-headers, django-debug-toolbar, django-filter, django-js-asset, django-mptt, django-pglocks, prometheus-client, django-prometheus, click, rq, django-rq, django-tables2, django-taggit, django-timezone-field, djangorestframework, MarkupSafe, Jinja2, coreschema, uritemplate, itypes, certifi, urllib3, idna, charset-normalizer, requests, coreapi, inflection, ruamel.yaml.clib, ruamel.yaml, PyYAML, pyrsistent, zipp, importlib-resources, pkgutil-resolve-name, attrs, jsonschema, swagger-spec-validator, drf-yasg, gunicorn, Markdown, netaddr, Pillow, psycopg2-binary, pycryptodome, svgwrite, tablib
Successfully installed Django-3.2 Jinja2-2.11.3 Markdown-3.3.4 MarkupSafe-2.1.1 Pillow-8.2.0 PyYAML-5.4.1 asgiref-3.5.2 async-timeout-4.0.2 attrs-22.1.0 certifi-2022.9.24 charset-normalizer-2.1.1 click-8.1.3 coreapi-2.3.3 coreschema-0.0.4 deprecated-1.2.13 django-cacheops-5.1 django-cors-headers-3.7.0 django-debug-toolbar-3.2.1 django-filter-2.4.0 django-js-asset-2.0.0 django-mptt-0.12.0 django-pglocks-1.0.4 django-prometheus-2.1.0 django-rq-2.4.1 django-tables2-2.3.4 django-taggit-1.3.0 django-timezone-field-4.1.2 djangorestframework-3.12.4 drf-yasg-1.20.0 funcy-1.17 gunicorn-20.1.0 idna-3.4 importlib-resources-5.10.0 inflection-0.5.1 itypes-1.2.0 jsonschema-4.16.0 netaddr-0.8.0 packaging-21.3 pkgutil-resolve-name-1.3.10 prometheus-client-0.15.0 psycopg2-binary-2.8.6 pycryptodome-3.10.1 pyparsing-3.0.9 pyrsistent-0.18.1 pytz-2022.5 redis-4.3.4 requests-2.28.1 rq-1.11.1 ruamel.yaml-0.17.21 ruamel.yaml.clib-0.2.7 six-1.16.0 sqlparse-0.4.3 svgwrite-1.4.1 swagger-spec-validator-3.0.2 tablib-3.0.0 uritemplate-4.1.1 urllib3-1.26.12 wrapt-1.14.1 zipp-3.10.0
WARNING: You are using pip version 19.3.1; however, version 22.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Skipping local dependencies (local_requirements.txt not found)
Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
File "netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
django.setup()
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/django/apps/config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/netbox-2.11.0/netbox/circuits/models.py", line 6, in <module>
from dcim.models import CableTermination, PathEndpoint
File "/opt/netbox-2.11.0/netbox/dcim/models/__init__.py", line 1, in <module>
from .cables import *
File "/opt/netbox-2.11.0/netbox/dcim/models/cables.py", line 15, in <module>
from netbox.models import BigIDModel, PrimaryModel
File "/opt/netbox-2.11.0/netbox/netbox/models.py", line 13, in <module>
from utilities.utils import serialize_object
File "/opt/netbox-2.11.0/netbox/utilities/utils.py", line 9, in <module>
from jinja2 import Environment
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/jinja2/__init__.py", line 12, in <module>
from .environment import Environment
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
from .defaults import BLOCK_END_STRING
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/opt/netbox-2.11.0/venv/lib64/python3.8/site-packages/markupsafe/__init__.py)
#
—
Reply to this email directly, view it on GitHub<#10772 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM6MCNOH6PSQ3ZVYXMTWFPT7JANCNFSM6AAAAAARQATEFY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
OK, I fixed this python36 issue : Then when I run
from GUI output Server Error A module import error occurred during this request. Common causes include the following: Missing required packages - This installation of NetBox might be missing one or more required Python packages. These packages are listed in requirements.txt and local_requirements.txt, and are normally installed as part of the installation or upgrade process. To verify installed packages, run pip freeze from the console and compare the output to the list of required packages. WSGI service not restarted after upgrade - If this installation has recently been upgraded, check that the WSGI service (e.g. gunicorn or uWSGI) has been restarted. This ensures that the new code is running. The complete exception is provided below: <class 'ModuleNotFoundError'> No module named 'utilities.auth_backends' Python version: 3.8.14 ...Just for the testing app I hope I don't need to tun WSGI service right ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have old running netbox ver. 2.8.6. on CentOS 7,
I have upgraded python from 2.6. to 2.8 to meet prerequisites. Python compiled from source.
I tried to upgrade netbox to current v. 3.3.6, but when I run ./upgrade I got this errors
Beta Was this translation helpful? Give feedback.
All reactions