[mod_python] mod_python servlet failing on non-existent code

Chris Curvey ccurvey at earthlink.net
Fri Aug 13 12:07:12 EDT 2004


Hold on, I think I was having a brain cramp.  It looks like my servlet 
is kicking out a 204, so the stuff in the browser isn't even being updated.

Sheesh.  Sorry.

Chris Curvey wrote:

> Gregory (Grisha) Trubetskoy wrote:
>
>>
>>
>> On Fri, 13 Aug 2004, Chris Curvey wrote:
>>
>>> I'm hacking my way through a proof-of-concept with mod_python 
>>> servlets, and I'm coming across something strange.  When I hit my 
>>> page, I'm getting an error message returned in a browser ("unpack 
>>> tuple of wrong size").   The strange part is that the line listed in 
>>> the browser doesn't exist in my code anymore.  (I changed that line 
>>> as part of the debugging process.)
>>
>>
>>
>> This is not unusual - Python caches locations of lines so when a 
>> module is reloaded oftentimes the traceback will refer to the source 
>> code as it was in the original file. The only way to get around this 
>> is to restart the server.
>
>
> That's what's so confusing to me.  I did restart the server, and I'm 
> still seeing the old code.  There aren't even any pyc files around for 
> me to blame it on.  (Not to mention the fact that the entire page is 
> generated properly, at least somewhere.)
>
>>
>>> So I figured that maybe I was having a problem with mod_python 
>>> caching classes, and I restarted apache just as "httpd -X".  I hit 
>>> the page again, and the same error message shows up in the browser, 
>>> but the HTML that I want shows up in the window where I started httpd.
>>
>>
>>
>> Are you writing your output to stdout (using "print") or stderr for 
>> some reason?
>
>
> Hmm, I'm using self.writeln() to write out the html, I don't remember 
> off the top of my head if that's from mod_python itself or from the 
> servlets...
>
>>
>> Grisha
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list