On May 12, 2007, at 9:57 PM, Malcolm Tredinnick wrote:

> This could be as simple as a mismatch between documentation and code
> version.

Thank you, Malcom. I downloaded the current version, 0.96, and  
installed it.

When I call the django.fcgi using "http://localhost/cgi-bin/ 
django.fcgi", I get the trace back later in this note.

In case it is related, when I start the server, I see in the error  
log a FastCGI error "access for server failed: write not allowed".

  - Mark



Content of trace back in browser:

  /usr/local/bin/build/bdist.macosx-10.4-fat/egg/flup/server/ 
fcgi_base.py in run(self=<flup.server.fcgi_base.Request object at  
0x743930>)
  /usr/local/bin/build/bdist.macosx-10.4-fat/egg/flup/server/ 
fcgi_base.py in handler(self=<flup.server.fcgi_fork.WSGIServer object  
at 0x7436f0>, req=<flup.server.fcgi_base.Request object at 0x743930>)
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
site-packages/django/core/handlers/wsgi.py in __call__ 
(self=<django.core.handlers.wsgi.WSGIHandler object at 0x587c30>,  
environ={'DOCUMENT_ROOT': '/Library/WebServer/Documents',  
'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/ 
xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/ 
png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET':  
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':  
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',  
'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': 'www.mysite.com',  
'HTTP_KEEP_ALIVE': '300', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh;  
U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/ 
1.5.0.11', ...}, start_response=<function start_response at 0x74b930>)
   187         try:
   188             request = WSGIRequest(environ)
   189             response = self.get_response(request)
   190
   191             # Apply response middleware
response undefined, self = <django.core.handlers.wsgi.WSGIHandler  
object at 0x587c30>, self.get_response = <bound method  
WSGIHandler.get_response of <djang...re.handlers.wsgi.WSGIHandler  
object at 0x587c30>>, request = <WSGIRequest GET:<MultiValueDict: {} 
 >, POST:<Mul...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
site-packages/django/core/handlers/base.py in get_response 
(self=<django.core.handlers.wsgi.WSGIHandler object at 0x587c30>,  
request=<WSGIRequest GET:<MultiValueDict: {}>,  
POST:<Mul...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>)
    57         # Apply request middleware
    58         for middleware_method in self._request_middleware:
    59             response = middleware_method(request)
    60             if response:
    61                 return response
response undefined, middleware_method = <bound method  
CommonMiddleware.process_request o...ware.common.CommonMiddleware  
object at 0x772e70>>, request = <WSGIRequest GET:<MultiValueDict: {} 
 >, POST:<Mul...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
  /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
site-packages/django/middleware/common.py in process_request 
(self=<django.middleware.common.CommonMiddleware object at 0x772e70>,  
request=<WSGIRequest GET:<MultiValueDict: {}>,  
POST:<Mul...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>)
    39         # Append a slash if append_slash is set and the URL  
doesn't have a
    40         # trailing slash or a file extension.
    41         if settings.APPEND_SLASH and (old_url[1][-1] != '/')  
and ('.' not in old_url[1].split('/')[-1]):
    42             new_url[1] = new_url[1] + '/'
    43             if settings.DEBUG and request.method == 'POST':
global settings = <django.conf.LazySettings object at 0x772b10>,  
settings.APPEND_SLASH = True, old_url = ['www.mysite.com',  
''], ].split undefined

IndexError: string index out of range
       args = ('string index out of range',)

Contents of django.fcgi

#!/usr/local/bin/python2.4
## the line above was changed to accomodate the talehquah server  
python set up.
## original line was "/usr/bin/python"

import sys, os

# Add a custom Python path.
# sys.path.insert(0, "/home/user/python")

# Switch to the directory of your project. (Optional.)
os.chdir("/usr/local/examaid")

# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "examaid.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to