Database migration fails (v2.4.4 -> v.2.5.2) #2254

Closed
opened 2025-12-29 17:24:10 +01:00 by adam · 2 comments
Owner

Originally created by @iDemonix on GitHub (Jan 3, 2019).

The upgrade.sh script is barfing after installing all of the package updates. Pip satisfies all requirements, but then database migration and 'collecting static files' fails with a syntax error.

Using Python 3.4.5.

Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
  File "netbox/manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
  File "/usr/lib/python3.4/site-packages/django/core/management/__init__.py", line 11, in <module>
    from django.conf import settings
  File "/usr/lib/python3.4/site-packages/django/conf/__init__.py", line 18, in <module>
    from django.utils.functional import LazyObject, empty
  File "/usr/lib/python3.4/site-packages/django/utils/functional.py", line 12
    return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs})
                                ^
SyntaxError: invalid syntax
Collecting static files (python3 netbox/manage.py collectstatic --no-input)...
Traceback (most recent call last):
  File "netbox/manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
  File "/usr/lib/python3.4/site-packages/django/core/management/__init__.py", line 11, in <module>
    from django.conf import settings
  File "/usr/lib/python3.4/site-packages/django/conf/__init__.py", line 18, in <module>
    from django.utils.functional import LazyObject, empty
  File "/usr/lib/python3.4/site-packages/django/utils/functional.py", line 12
    return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs})
                                ^
SyntaxError: invalid syntax

Originally created by @iDemonix on GitHub (Jan 3, 2019). The upgrade.sh script is barfing after installing all of the package updates. Pip satisfies all requirements, but then database migration and 'collecting static files' fails with a syntax error. Using Python 3.4.5. ``` Applying database migrations (python3 netbox/manage.py migrate)... Traceback (most recent call last): File "netbox/manage.py", line 8, in <module> from django.core.management import execute_from_command_line File "/usr/lib/python3.4/site-packages/django/core/management/__init__.py", line 11, in <module> from django.conf import settings File "/usr/lib/python3.4/site-packages/django/conf/__init__.py", line 18, in <module> from django.utils.functional import LazyObject, empty File "/usr/lib/python3.4/site-packages/django/utils/functional.py", line 12 return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs}) ^ SyntaxError: invalid syntax Collecting static files (python3 netbox/manage.py collectstatic --no-input)... Traceback (most recent call last): File "netbox/manage.py", line 8, in <module> from django.core.management import execute_from_command_line File "/usr/lib/python3.4/site-packages/django/core/management/__init__.py", line 11, in <module> from django.conf import settings File "/usr/lib/python3.4/site-packages/django/conf/__init__.py", line 18, in <module> from django.utils.functional import LazyObject, empty File "/usr/lib/python3.4/site-packages/django/utils/functional.py", line 12 return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs}) ^ SyntaxError: invalid syntax ```
adam closed this issue 2025-12-29 17:24:10 +01:00
Author
Owner

@iDemonix commented on GitHub (Jan 3, 2019):

I've just realised the requirement was Python 3.5, so that's more than likely my issue...

@iDemonix commented on GitHub (Jan 3, 2019): I've just realised the requirement was Python 3.5, so that's more than likely my issue...
Author
Owner

@iDemonix commented on GitHub (Jan 3, 2019):

Solved by upgrading to Python 3.6 and actually reading the instructions 😄

@iDemonix commented on GitHub (Jan 3, 2019): Solved by upgrading to Python 3.6 and actually reading the instructions 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2254