Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

TypeErro: 'module' object is not callable

Olá, não consigo rodar devido a esse erro:

Traceback (most recent call last): File "/home/albaniere/Documents/alura_space/manage.py", line 22, in main() File "/home/albaniere/Documents/alura_space/manage.py", line 18, in main execute_from_command_line(sys.argv) File "/home/albaniere/Documents/alura_space/venv/lib/python3.10/site-packages/django/core/management/init.py", line 442, in execute_from_command_line utility.execute() File "/home/albaniere/Documents/alura_space/venv/lib/python3.10/site-packages/django/core/management/init.py", line 382, in execute settings.INSTALLED_APPS File "/home/albaniere/Documents/alura_space/venv/lib/python3.10/site-packages/django/conf/init.py", line 102, in getattr self.setup(name) File "/home/albaniere/Documents/aluraspace/venv/lib/python3.10/site-packages/django/conf/init.py", line 89, in setup self.wrapped = Settings(settings_module) File "/home/albaniere/Documents/alura_space/venv/lib/python3.10/site-packages/django/conf/init.py", line 217, in init mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return bootstrap.gcd_import(name[level:], package, level) File "", line 1050, in gcdimport File "", line 1027, in findand_load File "", line 1006, in findand_load_unlocked File "", line 688, in loadunlocked File "", line 883, in exec_module File "", line 241, in callwith_frames_removed File "/home/albaniere/Documents/alura_space/setup/settings.py", line 129, in STATIC_ROOT = os.path(BASE_DIR, 'static') TypeError: 'module' object is not callable

2 respostas
solução!

Nesse contexto, acredito que você está tentando armazenar em STATIC_ROOT o caminho armazenado em BASE_DIR complementado de 'static' Nesse caso, o módulo path deve utilizar a função join. STATIC_ROOT = os.path.join(BASE_DIR, 'static')

Mt obrigado. Era esse o problema mesmo.