Target WSGI script ‘C:/Dev/GitStack/app/django.wsgi’ cannot be loaded as Python module.

0
I checked the file, and it does exist. Could this be an NTFS security issue? Here is the log:

[Wed Apr 11 16:53:20 2012] [notice] Child 2864: Starting thread to listen on port 9091. [Wed Apr 11 16:53:26 2012] [error] [client ::1] mod_wsgi (pid=2864): Target WSGI script 'C:/Dev/GitStack/app/django.wsgi' cannot be loaded as Python module. [Wed Apr 11 16:53:26 2012] [error] [client ::1] mod_wsgi (pid=2864): Exception occurred processing WSGI script 'C:/Dev/GitStack/app/django.wsgi'. [Wed Apr 11 16:53:26 2012] [error] [client ::1] Traceback (most recent call last): [Wed Apr 11 16:53:26 2012] [error] [client ::1] File "C:/Dev/GitStack/app/django.wsgi", line 11, in [Wed Apr 11 16:53:26 2012] [error] [client ::1] import django.core.handlers.wsgi [Wed Apr 11 16:53:26 2012] [error] [client ::1] ImportError: No module named django.core.handlers.wsgi
asked April 11, 2012

8 Answers

0
It seems that you had an issue with the installer. Are you sure that you installed GitStack in a directory without any spaces ?
0
No, there are no spaces. It was that exact directory: c:\dev\GitStack\. I originally installed it on a different volume (d:\GitStack\), but the GitStack service wouldn't start up at all. I looked through all the conf files, and I noticed that they had references to the folder c:/dev/GitStack/ hardcoded. The installer never changed these folder references. I first manually changed the root folder to d:/GitStack/ in all of the conf files to at least get the GitStack service started without error. However, when I tried to view the website in a browser, that's when this Django error occurred. Since I thought I might have missed changing some settings, I decided to uninstall GitStack and install it on c:\dev\GitStack to avoid having to manually change all the folder references. When I did this, the service started up without error without modifying any of the conf files, but I still got this Django error again when I tried to view GitStack in a browser.
0

I thought I'd let you know that I uninstalled again, and reinstalled on d:\GitStack\. This time the installer did change all the folder references in the conf files correctly.</p?

However, the Django error still occurred. Here are the contents of my django.wsgi file:

import os
import sys
path = 'D:/GitStack/app'
if path not in sys.path:
sys.path.append(path)
sys.path.append('D:/GitStack')
os.environ['DJANGO_SETTINGS_MODULE'] = 'app.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Path PATH environment variable includes: D:\GitStack\python;D:\GitStack\python\Scripts;D:\GitStack\git\cmd
0
Could you check if there are some path issues in the file
C:\GitStack\apache\conf\gitstack\wsgi.conf ? Is the path to django.wsgi correct in this file ?
I will check if there is any issues when I install GitStack on a D: drive. (The installer was tested on the C: drive only on multiple versions of Windows)
0
Could you try to add as much info as you can on this ticket (operating system, other programs installed, errors, apache logs, etc.)?

Thank you
0
The paths in the wsgi.conf file and the django.wsgi file seem to be correct.
0
Please copy and paste your current apache error. I am pretty sure that's not the same as the previous one.
0
I posted the error log in the github ticket. It's still the same django error.

Your Answer

Please login to post questions.