Lembro que na primeira etapa do curso também tive problema em fazer a migração. O pessoal me ajudou a reconfigurar o que precisava, mas voltou a ocasionar também na parte 2. Poderiam me ajudar novamente?
Mesmo com a venv ativada ocorre o erro do help e utilizando outro ou o mesmo terminal:
(venv) ➜ alura-space git:(master) ✗ python manage.py help
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 669, in exec_module
File "<frozen importlib._bootstrap_external>", line 775, in get_code
File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/mmaia/projetos/alura-space/galeria/models.py", line 10
return f"Fotografia [nome={self.nome}]"
Diz que está com erro de sintaxe na linha 10 porém é o mesmo do vídeo.
makemigrations também não vai adiante, pede para fazer alterações no manage.py:
(venv) ➜ alura-space git:(master) ✗ python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/home/mmaia/projetos/alura-space/venv/lib/python3.5/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 669, in exec_module
File "<frozen importlib._bootstrap_external>", line 775, in get_code
File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/mmaia/projetos/alura-space/galeria/models.py", line 10
return f"Fotografia [nome={self.nome}]"
^
SyntaxError: invalid syntax