2

I'm deploying my Django project on a Linux server. When I run the command python manage.py collectstaticI get the following error:

  File "/home/student/PickFeel/venv/lib/python3.5/site-packages/django/db/models/enums.py", line 81, in TextChoices
    def _generate_next_value_(name, start, count, last_values):
  File "/usr/lib/python3.5/enum.py", line 61, in __setitem__
    raise ValueError('_names_ are reserved for future Enum use')
ValueError: _names_ are reserved for future Enum use

enum.py is a system generated file.

How do I fix this?

1 Answers1

2

This happens since python3.5 does not support _missing_ function for enums. It is supported in python3.8 see here from the docs

Consider upgrading your python version to 3.8 or any other version that supports the _missing_ function.

If you already have a latest version then use the suitable command, e.g. instead of this

python manage.py collectstatic

Do

python3.x manage.py collectstatic
AzyCrw4282
  • 5,754
  • 3
  • 13
  • 25