运行时出现以下错误: Python manage.py createsuperuser
Traceback (most recent call last):
File "/Users/project/env/lib/python3.7/site-packages/django/contrib/auth/password_validation.py", line 174, in __init__
with gzip.open(password_list_path, 'rt', encoding='utf-8') as f:
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py", line 163, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/project/env/lib/python3.7/site-packages/django/contrib/auth/common-passwords.txt.gz'发布于 2020-01-01 02:07:30
问题出在django目录中的common-passwords.txt.gz文件。找回文件的最简单方法是在虚拟环境中重新安装 django。
https://stackoverflow.com/questions/59534987
复制相似问题