Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro ao inserir o comando collectstatic

Boa tarde. Segui passo a passo e estava dando certo, mas ao tentar inserir o comando, me apareceu este erro e não consegui corrigir.

(venv) arbarros@arbarros-Inspiron-5448:~/dev/alura-space$ python manage.py collectstatic


Traceback (most recent call last):
  File "/home/arbarros/dev/alura-space/manage.py", line 22, in <module>
    main()
  File "/home/arbarros/dev/alura-space/manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/core/management/base.py", line 413, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/core/management/base.py", line 459, in execute
    output = self.handle(*args, **options)
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 184, in handle
    if self.is_local_storage() and self.storage.location:
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/utils/functional.py", line 253, in inner
    return func(_wrapped, *args)
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/utils/functional.py", line 47, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/arbarros/dev/alura-space/venv/lib/python3.10/site-packages/django/core/files/storage/filesystem.py", line 47, in location
    return os.path.abspath(self.base_location)
  File "/usr/lib/python3.10/posixpath.py", line 379, in abspath
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not list
1 resposta
solução!

Olá. Passando para comentar que superei o erro. Reinicie tudo, testei e funcionou perfeitamente.

Agradecido pela atenção!