Can you please edit your tools.py and replace:

next = '?_next='+urllib.quote(URL(args=request.args,vars=request.vars))


with

next = '?_next='+urllib.quote(URL(args=request.args,vars=request.get_vars))


Does this get rid of the error?

On Thursday, 19 July 2012 00:31:02 UTC-5, Janath wrote:
>
> Hi,
> I fixed the bug mentioned follow. However when I tried to upload a file 
> having size ~25MB it generates an internal error.
>
> I have attached the screenshot of the error ticket. 
>
> Appreciate your support,
> Janath
>
>
>
>
>
> On Wednesday, June 13, 2012 10:17:24 PM UTC-5, Anthony wrote:
>>
>> Fixed in trunk now: 
>> http://code.google.com/p/web2py/source/detail?r=9debb760021449f9857247efccae5799c84fa515
>>
>> On Wednesday, June 13, 2012 8:25:02 AM UTC-4, Anthony wrote:
>>>
>>> I think this is a bug. If you're using the "welcome" app layout.html, 
>>> auth.navbar() is inserted here: 
>>> http://code.google.com/p/web2py/source/browse/applications/welcome/views/layout.html#96.
>>>  
>>> However, rather than completely removing, try the following:
>>>
>>> auth.navbar(..., action=URL())
>>>
>>> That will disable the navbar's "next" functionality, though (i.e., if 
>>> you click on a navbar link, it will no longer take you back to the page you 
>>> were on before clicking). Another option might be:
>>>
>>> {{request.vars = request.get_vars}}
>>> <div id="navbar">{{='auth' in globals() and auth.navbar(separators=(' ',' 
>>> ','')) or ''}}</div>
>>>
>>> Anthony
>>>
>>> On Wednesday, June 13, 2012 1:40:41 AM UTC-4, Janath wrote:
>>>>
>>>> Hi,
>>>>
>>>> How can I turn off that. tried but so-far couldn't make it.
>>>>
>>>> Thank you,
>>>> Janath
>>>>
>>>> On Tuesday, June 12, 2012 7:16:59 PM UTC-5, Derek wrote:
>>>>>
>>>>> line 1189, in navbar
>>>>>
>>>>>
>>>>> Can you turn off the 'navbar' and try again? It's trying to urlquote that 
>>>>> whole file that you uploaded.
>>>>>
>>>>>
>>>>> On Tuesday, June 12, 2012 1:47:44 PM UTC-7, Janath wrote:
>>>>>>
>>>>>> Further: I run source on python 2.5.
>>>>>>
>>>>>> I have this issue when I run source and the executable.
>>>>>>
>>>>>>
>>>>>> On Tuesday, June 12, 2012 3:45:17 PM UTC-5, Janath wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am trying to upload a file using follwing code segment (database 
>>>>>>> table is shown below).
>>>>>>>
>>>>>>> I tried a file ~25MB. It generates a exceptions.MemoryError and there 
>>>>>>> is no record insert to the table. 
>>>>>>>
>>>>>>> Tried and was successful with a 2 MB file. I think I will have to 
>>>>>>> upload max ~30MB.
>>>>>>>
>>>>>>> Error description is shown below.
>>>>>>>
>>>>>>> Support appreciated!
>>>>>>> Janath
>>>>>>>
>>>>>>>
>>>>>>> *this routine uploads file:*
>>>>>>>
>>>>>>> def new_network_data():
>>>>>>>     form = SQLFORM(db.network_data)
>>>>>>>     if form.process().accepted:
>>>>>>>         response.flash = 'new record inserted'
>>>>>>>     download = URL('download')  # to see the picture
>>>>>>>     records = SQLTABLE(db().select(db.network_data.ALL), 
>>>>>>> upload=download,
>>>>>>>                        headers='fieldname:capitalize')
>>>>>>>     return dict(form=form, records=records)
>>>>>>>
>>>>>>> *network_data table:*
>>>>>>>
>>>>>>> db.define_table(
>>>>>>>         'network_data',
>>>>>>>         Field('sav_file', 'upload', default=''),
>>>>>>>         Field('description', 'text', default='network data will be 
>>>>>>> selected based on the description'),
>>>>>>>         format = '%(name)s')
>>>>>>>     
>>>>>>> db.network_data.sav_file.requires=IS_UPLOAD_FILENAME(extension='sav')
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --------------------------------------------------------------------------------------------------------------------------------------------------
>>>>>>>
>>>>>>> TICKET ID
>>>>>>>
>>>>>>> 127.0.0.1.2012-06-12.15-34-51.d5191840-7166-40fe-9cd8-5508007b894e
>>>>>>> <type 'exceptions.MemoryError'>VERSIONweb2py™(1, 99, 7, 
>>>>>>> datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable')PythonPython 
>>>>>>> 2.5.1: C:\Python25\pythonw.exeTRACEBACK
>>>>>>>
>>>>>>> 1.
>>>>>>> 2.
>>>>>>> 3.
>>>>>>> 4.
>>>>>>> 5.
>>>>>>> 6.
>>>>>>> 7.
>>>>>>> 8.
>>>>>>> 9.
>>>>>>> 10.
>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>>>>   File 
>>>>>>> "C:\Users\umgeegan\Desktop\web2py_src\web2py\gluon\restricted.py", line 
>>>>>>> 205, in restricted
>>>>>>>     exec ccode in environment
>>>>>>>   File 
>>>>>>> "C:\Users\umgeegan\web2py_src\web2py\applications\PythonPSSE\views\default/new_network_data.html",
>>>>>>>  line 56, in <module>
>>>>>>>   File "C:\Users\umgeegan\web2py_src\web2py\gluon\tools.py", line 1189, 
>>>>>>> in navbar
>>>>>>>     next = 
>>>>>>> '?_next='+urllib.quote(URL(args=request.args,vars=request.vars))
>>>>>>>   File "C:\Python25\lib\urllib.py", line 1205, in quote
>>>>>>>     res = map(safe_map.__getitem__, s)
>>>>>>> MemoryError
>>>>>>>
>>>>>>> ERROR SNAPSHOT [image: help]
>>>>>>>
>>>>>>> <type 'exceptions.MemoryError'>()
>>>>>>>
>>>>>>

-- 



Reply via email to