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'>()
>