Forums

Error

[formatted by admin]

2021-04-29 18:11:48,383: If you're seeing an import error and don't know why,
2021-04-29 18:11:48,383: we have a dedicated help page to help you debug: 
2021-04-29 18:11:48,383: https://help.pythonanywhere.com/pages/DebuggingImportError/
2021-04-29 18:11:48,383: ***************************************************
2021-04-29 18:12:21,503: Error running WSGI application
2021-04-29 18:12:21,507: TypeError: 'str' object is not callable
2021-04-29 18:12:21,507:   File "/var/www/paulosix_pythonanywhere_com_wsgi.py", line 29, in <module>
2021-04-29 18:12:21,508:     application = get_wsgi_application()
2021-04-29 18:12:21,508: 
2021-04-29 18:12:21,508:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2021-04-29 18:12:21,508:     django.setup(set_prefix=False)
2021-04-29 18:12:21,508: 
2021-04-29 18:12:21,508:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/django/__init__.py", line 19, in setup
2021-04-29 18:12:21,508:     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2021-04-29 18:12:21,509: 
2021-04-29 18:12:21,509:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
2021-04-29 18:12:21,509:     self._setup(name)
2021-04-29 18:12:21,509: 
2021-04-29 18:12:21,509:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
2021-04-29 18:12:21,509:     self._wrapped = Settings(settings_module)
2021-04-29 18:12:21,509: 
2021-04-29 18:12:21,509:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
2021-04-29 18:12:21,510:     mod = importlib.import_module(self.SETTINGS_MODULE)
2021-04-29 18:12:21,510: 
2021-04-29 18:12:21,510:   File "/home/paulosix/djangoSIGE/djangosige/configs/__init__.py", line 3, in <module>
2021-04-29 18:12:21,510:     from .settings import *
2021-04-29 18:12:21,510: 
2021-04-29 18:12:21,510:   File "/home/paulosix/djangoSIGE/djangosige/configs/settings.py", line 19, in <module>
2021-04-29 18:12:21,511:     ALLOWED_HOSTS = config('localhost', '127.0.0.1', 'paulosix.pythonanywhere.com')
2021-04-29 18:12:21,511: 
2021-04-29 18:12:21,511:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/decouple.py", line 197, in __call__
2021-04-29 18:12:21,511:     return self.config(*args, **kwargs)
2021-04-29 18:12:21,511: 
2021-04-29 18:12:21,511:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/decouple.py", line 85, in __call__
2021-04-29 18:12:21,511:     return self.get(*args, **kwargs)
2021-04-29 18:12:21,512: 
2021-04-29 18:12:21,512:   File "/home/paulosix/.virtualenvs/singe/lib/python3.8/site-packages/decouple.py", line 79, in get
2021-04-29 18:12:21,512:     return cast(value)

By just reading the traceback message, it looks like cast is set to a string, which results in TypeError. Is decouple.py something you've installed? Could you take a look at decouple.py, line 79 and check what the cast is?

@paulosix Looks like you got your answer on StackOverflow.