[IronPython] IronPython/NWSGI 0-byte 200/404 response with HelloWorld?
Markus Törnqvist
mjt at nysv.org
Sat Sep 26 22:34:42 CEST 2009
On Sat, Sep 26, 2009 at 09:55:43AM -0600, Jeff Hardy wrote:
First off, there's so much randomality going on here it's impossible,
am I missing out on something everyone knows but me?
Could not load type 'Microsoft.Scripting.Runtime.CodeContext' from assembly
'Microsoft.Scripting, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.
[TypeLoadException: Could not load type 'Microsoft.Scripting.Runtime.CodeContext' from assembly 'Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
NWSGI.WsgiHandler.StartResponse(String status, List response_headers, PythonTuple exc_info) +0
CallSite.Target(Closure , CallSite , CodeContext , Object , Object , Object ) +288
django.core.handlers.wsgi$15.__call__$265(PythonFunction $function, Object self, Object environ, Object start_response) in C:\Program Files\IronPython 2.6\Lib\site-packages\django\core\handlers\wsgi.py:259
IronPython.Runtime.FunctionCaller`3.Call3(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1, T2 arg2) +105
CallSite.Target(Closure , CallSite , CodeContext , Object , PythonDictionary , StartResponseDelegate ) +278
CallSite.Target(Closure , CallSite , Object , PythonDictionary , StartResponseDelegate ) +616
_Scripting_(Object[] , PythonDictionary , StartResponseDelegate ) +125
NWSGI.WsgiHandler.ProcessRequest(HttpContext context) +126
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
This did work and I still do have the Runtime mapping thing; wonder what
happened..
If I do iisreset and restart the site, it tends to get over it...
Sometimes getting over it means bugging, now I got
'module' object has no attribute 'wsgi'
Line 14: import django.core.handlers.wsgi
Line 15:
Line 16: application = django.core.handlers.wsgi.WSGIHandler()
Source File: C:\Program Files\IronPython 2.6\Lib\site-packages\mysite\hello.wsgi Line: 16
Then if I edit Web.config, like add a newline, and reload without iisreset or
restart, I get all sorts of funky effects like
http://ironpython.pastebin.com/m757a631b
Is the XML extremely sensitive to newlines and stuff?
The ONLY pattern I've been able to discern is that:
1. requests sometimes take a LONG time, especially the first time around
2. if I reload in mid-request, I might get different effects
>What do you have SESSION_ENGINE set to? Also, have you read
>http://docs.djangoproject.com/en/dev/topics/http/sessions/? I have had
>this working in the past, so I don't think IronPython's import system
>is the cause here.
The first time it was unset, so it defaulted to
django.contrib.sessions.backends.db
Then I set it explicitly and it still failed.
But like I said above, this tends to break in such random ways,
I think there's something else going on.
Am I the only guy looking at this?
Are there any better traces that can be captured?
I also put this up
http://ironpython.pastebin.com/mf52b185
Hope any of this helps..?
Thanks!
--
mjt
More information about the Ironpython-users
mailing list