First of all, thank you for starting this project. I'm using these docker configuration for my project, and it is much more convenient to deply online judge frontend.
I found an error while generating the schema for the DB by /dmoj/scripts/migrate.
Current Problem
migrate fails with ImportError
While executing migrate, it fails with ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py). I googled it, and found that Python 3.7, which is installed by apt-get install python3, doesn't support type hinting by default.
Error messages
Traceback (most recent call last):
File "manage.py", line 17, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.7/dist-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.7/dist-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/site/judge/models/__init__.py", line 4, in
from judge.models.comment import Comment, CommentLock, CommentVote
File "/site/judge/models/comment.py", line 16, in
from judge.models.contest import Contest
File "/site/judge/models/contest.py", line 14, in
from judge.models.problem import Problem
File "/site/judge/models/problem.py", line 18, in
from judge.models.profile import Organization, Profile
File "/site/judge/models/profile.py", line 9, in
import webauthn
File "/usr/local/lib/python3.7/dist-packages/webauthn/__init__.py", line 1, in
from .registration.generate_registration_options import generate_registration_options
File "/usr/local/lib/python3.7/dist-packages/webauthn/registration/generate_registration_options.py", line 3, in
from webauthn.helpers import generate_challenge
File "/usr/local/lib/python3.7/dist-packages/webauthn/helpers/__init__.py", line 11, in
from .options_to_json import options_to_json # noqa: F401
File "/usr/local/lib/python3.7/dist-packages/webauthn/helpers/options_to_json.py", line 3, in
from .structs import (
File "/usr/local/lib/python3.7/dist-packages/webauthn/helpers/structs.py", line 2, in
from typing import List, Literal, Optional
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
Suggestion
How about changing the image of base from debian:buster-slim to python:3.8-slim-buster?
Hello,
First of all, thank you for starting this project. I'm using these docker configuration for my project, and it is much more convenient to deply online judge frontend.
I found an error while generating the schema for the DB by
/dmoj/scripts/migrate
.Current Problem
migrate
fails with ImportError While executingmigrate
, it fails withImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
. I googled it, and found that Python 3.7, which is installed byapt-get install python3
, doesn't support type hinting by default.Error messages
Traceback (most recent call last): File "manage.py", line 17, inSuggestion
How about changing the image of
base
fromdebian:buster-slim
topython:3.8-slim-buster
?