related_val: tuple[int, ...]
TypeError: 'type' object is not subscriptable
完整:
(venv) G:\Html_project\LoveCards\index\chat>python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
utility.execute()
File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\core\management\__init__.py", line 395, in execute
django.setup()
File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\apps\config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "G:\Python\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "G:\Html_project\LoveCards\index\chat\index\models.py", line 8, in <module>
from drfutils.models import RelatedManager
File "G:\Html_project\LoveCards\index\chat\drfutils\models.py", line 10, in <module>
class RelatedManager(Manager[_M]):
File "G:\Html_project\LoveCards\index\chat\drfutils\models.py", line 15, in RelatedManager
related_val: tuple[int, ...]
TypeError: 'type' object is not subscriptable
我模块都装上了。不知道为啥这里会报错,大佬帮帮忙
related_val: tuple[int, ...] TypeError: 'type' object is not subscriptable
完整: