On Sep 10, 2010, at 1:20 PM, _po wrote:
> 
> Hi,
> 
> I am having trouble with this patch. (rev d38a7099445b)
> The recently modified /gluon/streamer.py seems to prevent web2py from
> starting :

Thanks; I'll have a look.

> 
> $ hg up d38a7099445b
> 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
> 
> $ python web2py.py
> Traceback (most recent call last):
>  File "web2py.py", line 17, in <module>
>    import gluon.widget
>  File "/media/DONNEES/Mes documents/Documents/Prog/web2py/gluon/
> widget.py", line 28, in <module>
>    import main
>  File "/media/DONNEES/Mes documents/Documents/Prog/web2py/gluon/
> main.py", line 48, in <module>
>    from globals import Request, Response, Session
>  File "/media/DONNEES/Mes documents/Documents/Prog/web2py/gluon/
> globals.py", line 19, in <module>
>    from streamer import streamer, stream_file_or_304_or_206,
> DEFAULT_CHUNK_SIZE
>  File "/media/DONNEES/Mes documents/Documents/Prog/web2py/gluon/
> streamer.py", line 46, in <module>
>    error_message = main.thread.routes.error_message % 'invalid
> request',
> AttributeError: 'thread._local' object has no attribute 'routes'
> 
> 
> 
> 
> On 10 sep, 19:10, Jonathan Lundell <[email protected]> wrote:
>> Massimo has applied (after a false start on my part) the final portion of 
>> the app-specific routing patch. There are no API changes (unless you're 
>> directly looking at rewrite.params, in which case ask about the new 
>> interface), but the new code is thread-safe and should be good to go.
>> 
>> Have a look at the web2py book or at the comments in routes.example.py for 
>> general information on how to use the feature.
>> 
>> (This is not the next-gen URL-rewrite code, which is still a good intention 
>> merely. It's just the app-specific version of the existing URL-rewrite 
>> logic.)


Reply via email to