Interesting. Can you post the complete runserver command you’re using, along with the version of Django and the operating system you’re running this on?
I’ll continue to troubleshoot based on your advice. This is the command I’m running by default:
manage runserver
Using Windows 10, Django 3.2, and Python 3.9.4.
I was able to use runserver_plus, and I was able to run the server just fine. However, I received this output:
Error occurred during checks: PermissionError(13, 'Permission denied')
* Restarting with windowsapi reloader
Performing system checks...
System check identified no issues (0 silenced).
Error occurred during checks: PermissionError(13, 'Permission denied')
Django version 3.2, using settings 'myproject.settings.dev'
Development server is running at http://[127.0.0.1]:8000/
Using the Werkzeug debugger (http://werkzeug.pocoo.org/)
Quit the server with CTRL-BREAK.
* Debugger is active!
* Debugger PIN: ***
* Running on http://127.0.0.1:8000/ (Press CTRL+C to quit)
I ran manage check, and the system didn’t find any other errors.
The error seems to be related to file permissions. I did reset all the file permissions, but continue to receive the same error. I just read that Python could be confusing a folder as a file in Windows, and that would cause the problem. I’m now trying to figure out what folder that could be in my project.
I added a print statement to check_errors function in the runserver_plus command to show the files that have exceptions. It seems like a handy tool to add to the output anyway. Regardless, I discovered that the check_errors function is checking a file that simply doesn’t exist within the virtual environment. Now, it turns out, that I’m using a git repository, and the path to that file does exist on a different computer (path to the activate_this.py script), but not the one I’m developing on currently. I just tried re-creating the virtual environment, but I’m getting the same issue. I’m interested in other ideas. There is no reference to this file anywhere in the project.
I found the issue, and it is quite embarrassing. Apparently, many years ago on this particular project, I edited the wsgi.py file. I think I had edited it to take advantage of waitress. I had since returned to using Apache, but I never changed the wsgi file after that. Truth be told, I use neither waitress nor Apache during development; I think I was just doing a test with it. Honestly, I don’t remember why I modified that file, but I had hard-coded the path to the virtual environment on the modular level without any exception handling.
Upon commenting it, everything worked fine. I would have never been able to do this without your help, though. Thank you so much!