providedh / collaborative-platform

Collaboration made easy
GNU Affero General Public License v3.0
0 stars 1 forks source link

Retrieving files fail after accepting unifications #164

Closed Janchorizo closed 3 years ago

Janchorizo commented 3 years ago

As the title says, the server no longer retrieves the file after an unification has been accepted. This affects the files, dashboard, and disambiguator ui apps

web_1            | Traceback (most recent call last):
web_1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
web_1            |     response = get_response(request)
web_1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
web_1            |     response = self.process_exception_by_middleware(e, request)
web_1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
web_1            |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
web_1            |   File "/usr/local/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
web_1            |     return view_func(request, *args, **kwargs)
web_1            |   File "/code/src/collaborative_platform/apps/views_decorators.py", line 97, in decorator
web_1            |     return view(*args, **kwargs)
web_1            |   File "/code/src/collaborative_platform/apps/views_decorators.py", line 120, in inner
web_1            |     return func(request, *args, **kwargs)
web_1            |   File "/code/src/collaborative_platform/apps/files_management/api.py", line 221, in file
web_1            |     return file_version(request, *args, **kwargs)
web_1            |   File "/usr/local/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
web_1            |     return view_func(request, *args, **kwargs)
web_1            |   File "/code/src/collaborative_platform/apps/views_decorators.py", line 97, in decorator
web_1            |     return view(*args, **kwargs)
web_1            |   File "/code/src/collaborative_platform/apps/views_decorators.py", line 120, in inner
web_1            |     return func(request, *args, **kwargs)
web_1            |   File "/code/src/collaborative_platform/apps/files_management/api.py", line 240, in file_version
web_1            |     xml_content = file_version.get_rendered_content()
web_1            |   File "/code/src/collaborative_platform/apps/files_management/models.py", line 228, in get_rendered_content
web_1            |     content = file_renderer.render_file_version(self)
web_1            |   File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py", line 31, in render_file_version
web_1            |     self.__append_unifications()
web_1            |   File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py", line 235, in __append_unifications
web_1            |     elements = self.__create_certainties_elements_from_unifications(unifications)
web_1            |   File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py", line 260, in __create_certainties_elements_from_unifications
web_1            |     joined_unifications = self.__get_joined_unifications_from_db(unification, latest_commit)
web_1            |   File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py", line 282, in __get_joined_unifications_from_db
web_1            |     Q(deleted_in_commit_id__gte=latest_commit.id) | Q(deleted_in_commit__isnull=True),
web_1            | AttributeError: 'NoneType' object has no attribute 'id'
virdiignis commented 3 years ago

After making a unification with request to vis_api, the same happens. Commiting changes fixes issue.

bug-rancher commented 3 years ago

I tried to replicate this issue, but everything looks ok. I added a entity to existing clique without commit, and all files are downloaded correctly. Then I created a new clique with entities from all files without commit and again, all files are downloaded correctly.

Please try to cause this issue on dvelop branch, with latest changes, latest migrations and fresh database and let me know if this issue still exist. If yes, then please provide more detailed instructions how to replicate this issue.

Janchorizo commented 3 years ago

I checked the develop branch and recreated the environment. This issue persists. I pushed the latest changes for the UI so that you can use the API from within the browser.

Create a project, upload files, queue a job, and unify any given proposal (refresh the page to refresh the proposals). After accepting an unification, the server will fail to retrieve the file.

I provide you some test files as an example. group_0_long_annotated_1_modified.txt group_0_long_annotated_2_modified.txt group_0_long_annotated_0_modified.txt test2.txt

virdiignis commented 3 years ago

For me, the steps are:

  1. Rebuild on the newest develop.

  2. Register the account

  3. Create project with additional entities "song" and "band"

  4. Disable CSRF check in src/collaborative_platform/apps/api_vis/api.py:project_cliques()

  5. Run request:

    POST http://localhost:8000/api/vis/projects/1/cliques/
    Content-Type: application/json
    Cookie: acceptCookies=true; sessionid=wartq2vkwwa2xd2mh82pfynvh5vwxczb;
    
    {
    "entities": [7, 24],
    "certainty": "very high",
    "project_version": 4.0
    }

    With result:

    HTTP/1.1 200 OK
    Content-Type: application/json
    X-Frame-Options: SAMEORIGIN
    Content-Length: 145
    Vary: Cookie
    
    {
    "name": "John Lennon",
    "id": 1,
    "unification_statuses": [
        {
        "id": 7,
        "status": 200,
        "message": "OK"
        },
        {
        "id": 24,
        "status": 200,
        "message": "OK"
        }
    ]
    }
  6. Go to the project page and click on either of two files — the file's content is not showed. The response to the underlying API request is as follows:

AttributeError at /api/files/1/
'NoneType' object has no attribute 'id'

Request Method: GET
Request URL: http://localhost:8000/api/files/1/
Django Version: 2.2.16
Python Executable: /usr/local/bin/python
Python Version: 3.8.0
Python Path: ['/code/src/collaborative_platform', '/code/src/collaborative_platform', '/code', '/code/src/collaborative_platform', '/opt/.pycharm_helpers/pycharm_matplotlib_backend', '/opt/.pycharm_helpers/pycharm_display', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/site-packages']
Server time: Tue, 13 Oct 2020 16:46:50 +0000
Installed Applications:
['channels',
 'captcha',
 'dal',
 'dal_select2',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.gis',
 'apps.api_vis',
 'apps.core',
 'apps.files_management',
 'apps.index_and_search',
 'apps.projects',
 'apps.close_reading',
 'apps.dataset_stats',
 'apps.vis_dashboard',
 'apps.help',
 'social_django',
 'django_cleanup',
 'apps.nn_disambiguator',
 'apps.disambiguator_ui']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'social_django.middleware.SocialAuthExceptionMiddleware']

Traceback:

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.8/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  21.                 return view_func(request, *args, **kwargs)

File "/code/src/collaborative_platform/apps/views_decorators.py" in decorator
  97.         return view(*args, **kwargs)

File "/code/src/collaborative_platform/apps/views_decorators.py" in inner
  120.                     return func(request, *args, **kwargs)

File "/code/src/collaborative_platform/apps/files_management/api.py" in file
  221.         return file_version(request, *args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  21.                 return view_func(request, *args, **kwargs)

File "/code/src/collaborative_platform/apps/views_decorators.py" in decorator
  97.         return view(*args, **kwargs)

File "/code/src/collaborative_platform/apps/views_decorators.py" in inner
  120.                     return func(request, *args, **kwargs)

File "/code/src/collaborative_platform/apps/files_management/api.py" in file_version
  240.     xml_content = file_version.get_rendered_content()

File "/code/src/collaborative_platform/apps/files_management/models.py" in get_rendered_content
  228.         content = file_renderer.render_file_version(self)

File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py" in render_file_version
  31.         self.__append_unifications()

File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py" in __append_unifications
  235.             elements = self.__create_certainties_elements_from_unifications(unifications)

File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py" in __create_certainties_elements_from_unifications
  260.             joined_unifications = self.__get_joined_unifications_from_db(unification, latest_commit)

File "/code/src/collaborative_platform/apps/files_management/file_conversions/file_renderer.py" in __get_joined_unifications_from_db
  282.             Q(deleted_in_commit_id__gte=latest_commit.id) | Q(deleted_in_commit__isnull=True),

Exception Type: AttributeError at /api/files/1/
Exception Value: 'NoneType' object has no attribute 'id'
Request information:
USER: ela@ela.ela

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES:
connect.sid = 's%3A4Q9zQOhkJE8F8yTdIpw2f0pNqAf8XOlu.waBixeZw9%2Fj5rFBAbpTBYMo9X0WMENSPeC6hVcUaiqg'
io = 'k7xRmW4Fuk0aWpx_AAAH'
acceptCookies = 'true'
csrftoken = 'KDjT2lHHjYZKvlYqvmWFS6HotwjL9KtzCmGGRi4hMA2z15YO8O1unvohkr9tLwL0'
sessionid = 'wartq2vkwwa2xd2mh82pfynvh5vwxczb'

META:
CONTENT_TYPE = 'application/json'
CSRF_COOKIE = 'KDjT2lHHjYZKvlYqvmWFS6HotwjL9KtzCmGGRi4hMA2z15YO8O1unvohkr9tLwL0'
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE = 'pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7'
HTTP_CONNECTION = 'keep-alive'
HTTP_COOKIE = 'connect.sid=s%3A4Q9zQOhkJE8F8yTdIpw2f0pNqAf8XOlu.waBixeZw9%2Fj5rFBAbpTBYMo9X0WMENSPeC6hVcUaiqg; io=k7xRmW4Fuk0aWpx_AAAH; acceptCookies=true; csrftoken=KDjT2lHHjYZKvlYqvmWFS6HotwjL9KtzCmGGRi4hMA2z15YO8O1unvohkr9tLwL0; sessionid=wartq2vkwwa2xd2mh82pfynvh5vwxczb'
HTTP_DNT = '1'
HTTP_HOST = 'localhost:8000'
HTTP_REFERER = 'http://localhost:8000/files/2/'
HTTP_SEC_FETCH_DEST = 'empty'
HTTP_SEC_FETCH_MODE = 'cors'
HTTP_SEC_FETCH_SITE = 'same-origin'
HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36'
HTTP_X_CSRFTOKEN = 'Cq3OPybkR8nauqeL8qWTBuonCSGLBMO2u9qBEvyUkKqZ0ae9LS1I6T5gtNwtdy6t'
HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'
PATH_INFO = '/api/files/1/'
QUERY_STRING = ''
REMOTE_ADDR = '172.20.0.1'
REMOTE_HOST = '172.20.0.1'
REMOTE_PORT = 54916
REQUEST_METHOD = 'GET'
SCRIPT_NAME = ''
SERVER_NAME = '172.20.0.6'
SERVER_PORT = '8000'
wsgi.multiprocess = True
wsgi.multithread = True

Settings:
Using settings module collaborative_platform.settings
ABSOLUTE_URL_OVERRIDES = {}
ADDITIONAL_USABLE_TAGS = ['certainty', 'name', 'ab']
ADDITIONAL_XML_ID_BASES = ['annotator']
ADMINS = []
ALLOWED_HOSTS = []
ANONYMOUS_USER_ID = 1
APPEND_SLASH = True
ASGI_APPLICATION = 'collaborative_platform.routing.application'
AUTHENTICATION_BACKENDS = "('social_core.backends.google.GoogleOAuth2', 'social_core.backends.facebook.FacebookOAuth2', 'social_core.backends.orcid.ORCIDOAuth2', 'django.contrib.auth.backends.ModelBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = '/code/src/collaborative_platform'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_BEAT_SCHEDULE = {'prune-presence': {'task': 'close_reading.tasks.prune_presence', 'schedule': datetime.timedelta(seconds=60)}, 'prune-orphaned-annotating-xml-contents': {'task': 'close_reading.tasks.prune_orphaned_annotating_body_contents', 'schedule': datetime.timedelta(seconds=120)}, 'run_queued_nn_disambiguation_tasks': {'task': 'nn_disambiguator.run_queued_tasks', 'schedule': datetime.timedelta(seconds=5)}}
CELERY_BROKER_URL = 'redis://redis:6379'
CELERY_RESULT_BACKEND = 'redis://redis:6379'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TASK_SERIALIZER = 'json'
CHANNEL_LAYERS = {'default': {'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': {'hosts': [('redis', 6379)]}}}
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
CUSTOM_ENTITY = {'properties': {'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './text()'}}, 'listable': True, 'text_tag': 'name'}
DATABASES = {'default': {'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'collaborative_platform', 'USER': 'collaborative_platform', 'PASSWORD': '********************', 'HOST': 'postgres', 'PORT': '5432', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
DEBUG = True
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_ENTITIES = {'person': {'properties': {'sex': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': '@sex'}, 'age': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': '@age'}, 'forename': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './default:persName/default:forename/text()'}, 'surname': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './default:persName/default:surname/text()'}, 'occupation': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './default:occupation/text()'}, 'birth': {'type': <TypeChoice.date: <class 'datetime.date'>>, 'xpath': './default:birth/@when'}, 'death': {'type': <TypeChoice.date: <class 'datetime.date'>>, 'xpath': './default:death/@when'}, 'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './default:name/text()'}}, 'listable': True, 'text_tag': 'name', 'list_tag': 'listPerson', 'color': '#ff7f00', 'icon': '\\f007', 'unifiable': True}, 'event': {'properties': {'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './text()'}}, 'listable': True, 'text_tag': 'name', 'list_tag': 'listEvent', 'color': '#cecece', 'icon': '\\f274', 'unifiable': True}, 'org': {'properties': {'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './text()'}}, 'listable': True, 'text_tag': 'name', 'list_tag': 'listOrg', 'color': '#b4edfc', 'icon': '\\f1ad', 'unifiable': True}, 'object': {'properties': {'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './text()'}}, 'listable': True, 'text_tag': 'name', 'list_tag': 'listObject', 'color': '#b4d38d', 'icon': '\\f466', 'unifiable': True}, 'place': {'properties': {'country': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './default:country/text()'}, 'settlement': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './default:settlement/text()'}, 'geo': {'type': <TypeChoice.Point: <class 'django.contrib.gis.geos.point.Point'>>, 'xpath': './default:location/default:geo/text()'}, 'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './default:placeName/default:name/text()'}}, 'listable': True, 'text_tag': 'name', 'list_tag': 'listPlace', 'color': '#204191', 'icon': '\\f279', 'unifiable': True}, 'date': {'properties': {'when': {'type': <TypeChoice.date: <class 'datetime.date'>>, 'xpath': '@when'}, 'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './text()'}}, 'listable': False, 'text_tag': 'date', 'list_tag': None, 'color': '#868788', 'icon': '\\f073', 'unifiable': False}, 'time': {'properties': {'when': {'type': <TypeChoice.time: <class 'datetime.time'>>, 'xpath': '@when'}, 'name': {'type': <TypeChoice.str: <class 'str'>>, 'xpath': './text()'}}, 'listable': False, 'text_tag': 'time', 'list_tag': None, 'color': '#eab9e4', 'icon': '\\f017', 'unifiable': False}}
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
ES_HOST = 'elasticsearch'
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['channels', 'captcha', 'dal', 'dal_select2', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib.gis', 'apps.api_vis', 'apps.core', 'apps.files_management', 'apps.index_and_search', 'apps.projects', 'apps.close_reading', 'apps.dataset_stats', 'apps.vis_dashboard', 'apps.help', 'social_django', 'django_cleanup', 'apps.nn_disambiguator', 'apps.disambiguator_ui']
INTERNAL_IPS = []
LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'loggers': {'close_reading': {'handlers': ['console', 'close_reading_log_file'], 'level': 'DEBUG'}, 'files_management': {'handlers': ['console', 'files_management_log_file'], 'level': 'DEBUG'}, 'projects': {'handlers': ['console', 'projects_log_file'], 'level': 'DEBUG'}}, 'handlers': {'console': {'level': 'INFO', 'class': 'logging.StreamHandler', 'formatter': 'long'}, 'close_reading_log_file': {'level': 'INFO', 'class': 'logging.FileHandler', 'filename': '/code/src/collaborative_platform/../../logs/close_reading.log', 'formatter': 'long', 'filters': ['skip_logs_from_certain_modules']}, 'files_management_log_file': {'level': 'INFO', 'class': 'logging.FileHandler', 'filename': '/code/src/collaborative_platform/../../logs/files_management.log', 'formatter': 'long'}, 'projects_log_file': {'level': 'INFO', 'class': 'logging.FileHandler', 'filename': '/code/src/collaborative_platform/../../logs/projects.log', 'formatter': 'long'}}, 'formatters': {'long': {'format': '{asctime} - {levelname} - {message}', 'style': '{'}}, 'filters': {'skip_logs_from_certain_modules': {'()': 'django.utils.log.CallbackFilter', 'callback': <function skip_logs_from_certain_modules at 0x7fc14377f310>}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = 'index'
LOGIN_URL = 'login'
LOGOUT_REDIRECT_URL = None
LOGOUT_URL = 'logout'
LOGS_ROOT = '/code/src/collaborative_platform/../../logs'
MANAGERS = []
MEDIA_ROOT = '/code/src/collaborative_platform/../../media'
MEDIA_URL = '/media/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'social_django.middleware.SocialAuthExceptionMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NS_MAP = {None: 'http://www.tei-c.org/ns/1.0', 'xml': 'http://www.w3.org/XML/1998/namespace'}
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
POSTGRES_HOST = 'postgres'
PREPEND_WWW = False
REDIS_HOST = 'redis'
ROOT_URLCONF = 'collaborative_platform.urls'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'collaborative_platform.settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']
SITE_ID = 1
SOCIAL_AUTH_FACEBOOK_KEY = '********************'
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = {'fields': 'id, name, email'}
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']
SOCIAL_AUTH_FACEBOOK_SECRET = '********************'
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '********************'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '********************'
SOCIAL_AUTH_LOGIN_ERROR_URL = 'settings'
SOCIAL_AUTH_ORCID_KEY = '********************'
SOCIAL_AUTH_ORCID_SECRET = '********************'
SOCIAL_AUTH_PIPELINE = "('social_core.pipeline.social_auth.social_details', 'social_core.pipeline.social_auth.social_uid', 'social_core.pipeline.social_auth.auth_allowed', 'social_core.pipeline.social_auth.social_user', 'social_core.pipeline.user.get_username', 'social_core.pipeline.social_auth.associate_by_email', 'social_core.pipeline.user.create_user', 'social_core.pipeline.social_auth.associate_user', 'social_core.pipeline.social_auth.load_extra_data', 'social_core.pipeline.user.user_details')"
SOCIAL_AUTH_POSTGRES_JSONFIELD = True
SOCIAL_AUTH_RAISE_EXCEPTIONS = False
STATICFILES_DIRS = ['/code/src/collaborative_platform/static']
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/code/src/collaborative_platform/../../static'
STATIC_URL = '/static/'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/code/src/collaborative_platform/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'social_django.context_processors.backends', 'social_django.context_processors.login_redirect']}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'collaborative_platform.wsgi.application'
XML_NAMESPACES = {'default': 'http://www.tei-c.org/ns/1.0', 'tei': 'http://www.tei-c.org/ns/1.0', 'xml': 'http://www.w3.org/XML/1998/namespace', 'xi': 'http://www.w3.org/2001/XInclude'}
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'

You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard page generated by the handler for this status code.

Logs: logs.zip

virdiignis commented 3 years ago

Forgot to add files I've been using:

music.zip

bug-rancher commented 3 years ago

Fixed.