Did a bit more troubleshooting. Turns out problem still exist.
Using a “Django” repl template, could create superuser
But…
Using a “python” repl template and running
pip install django
django-admin startproject testErrorInDjango
python manage.py startapp testErrorApp
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
The createsuperuser command will fail after keying in the necessary info (user, email, password)
Link to Repl:
https://replit.com/@kwloong/TestErrorInDjango
Error:
Traceback (most recent call last):
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth/password_validation.py”, line 236, in **init**
with gzip.open(password_list_path, “rt”, encoding=“utf-8”) as f:
File “/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/gzip.py”, line 58, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File “/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/gzip.py”, line 174, in **init**
fileobj = self.myfileobj = builtins.open(filename, mode or ‘rb’)
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/runner/.cache/pip/pool/94/b4/cf/common-passwords.txt.gz’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/runner/TestErrorInDjango/testErrorInDjango/manage.py”, line 22, in
main()
File “/home/runner/TestErrorInDjango/testErrorInDjango/manage.py”, line 18, in main
execute_from_command_line(sys.argv)
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/core/management/**init**.py”, line 442, in execute_from_command_line
utility.execute()
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/core/management/**init**.py”, line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/core/management/base.py”, line 412, in run_from_argv
self.execute(*args, **cmd_options)
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth/management/commands/createsuperuser.py”, line 88, in execute
return super().execute(*args, **options)
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/core/management/base.py”, line 458, in execute
output = self.handle(*args, **options)
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth/management/commands/createsuperuser.py”, line 183, in handle
validate_password(password2, self.UserModel(**fake_user_data))
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth/password_validation.py”, line 50, in validate_password
password_validators = get_default_password_validators()
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth/password_validation.py”, line 22, in get_default_password_validators
return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS)
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth/password_validation.py”, line 36, in get_password_validators
validators.append(klass(**validator.get(“OPTIONS”, {})))
File “/home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth/password_validation.py”, line 239, in **init**
with open(password_list_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/runner/.cache/pip/pool/94/b4/cf/common-passwords.txt.gz’
The file common-passwords.txt.gz is at /home/runner/TestErrorInDjango/.pythonlibs/lib/python3.10/site-packages/django/contrib/auth
, which I understand is typical for django installs.
(older repls would be somewhere under venv subdirectory?)
Can’t figure out why it’s going to the cache (/home/runner/.cache/pip/pool/
) to find common-passwords.txt.gz
Thanks.