I'm getting this error of Magic version on my Virtual Environment when I run python3.8 manage.py migrate on my Django REST API.
I've already done the following after activating Virtual Environment:
- pip3 install python-magic --upgrade
Here is what exactly is shown at the very end.
magic.MagicException: b"File 5.41 supports only version 16 magic files.`myproject/misc/magic.mgc' is version 14>
myproject_common/misc/magic.mgc, 2607: Warning: offset `[' invalid
myproject_common/misc/magic.mgc, 2608: Warning: offset `[' invalid
myproject_common/misc/magic.mgc, 2617: Warning: offset `.' invalid
myproject_common/misc/magic.mgc, 2619: Warning: offset `.' invalid
myproject_common/misc/magic.mgc, 2635: Warning: offset `' invalid
myproject_common/misc/magic.mgc, 2653: Warning: offset `.' invalid
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/earthling/myEnv/lib/python3.8/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/earthling/myEnv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/home/earthling/myEnv/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/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 "/home/earthling/myprojects/MyAPI/myproject_auth/models.py", line 31, in <module>
from myproject_common.utils.helpers import delete_file_field
File "/home/earthling/myprojects/MyAPI/myproject_common/utils/helpers.py", line 131, in <module>
magic = magic.Magic(magic_file='myproject_common/misc/magic.mgc', mime=True)
File "/home/earthling/myEnv/lib/python3.8/site-packages/magic.py", line 66, in __init__
magic_load(self.cookie, magic_file)
File "/home/earthling/myEnv/lib/python3.8/site-packages/magic.py", line 291, in magic_load
return _magic_load(cookie, coerce_filename(filename))
File "/home/earthling/myEnv/lib/python3.8/site-packages/magic.py", line 217, in errorcheck_negative_one
raise MagicException(err)
magic.MagicException: b"File 5.41 supports only version 16 magic files. `myproject_common/misc/magic.mgc' is version 14"
There are several line of errors like the offset error but I have taken a few of them and posted it due to character limitations on stack.
Need help here since I'm stuck and unable to proceed ahead.