1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
(dp1
S'output'
p2
S''
sS'layer'
p3
S'/home/acrowe/lib/python/web2py/applications/turtle_art_images/controllers/default.py'
p4
sS'code'
p5
S"import os\n\nsession.converting = False\n\ndef index():\n if session.converting == True:\n redirect('jamiesprogram.html')\n else:\n os.system('python PngGenerator '+URL(request.application,'default','download',args=db.comment.file))\n session.converting = True\n if len(request.args):\n records = db(db.comment.image_id==request.args[0]).select()\n if len(request.args) and len(records):\n form = SQLFORM(db.comment, records[0], deletable=True)\n else:\n form = SQLFORM(db.comment, fields = ['title', 'file', 'creator', 'description'])\n if form.accepts(request.vars, session):\n response.flash = 'form accepted'\n elif form.errors:\n response.flash = 'form has errors'\n return dict(form=form)\n\ndef jamiesprogram():\n os.system('python PngGenerator '+URL(request.application,'default','download',args=db.comment.file))\n return dict()\n \ndef imagelist():\n comments = db().select(db.comment.ALL)\n return dict(comments=comments)\n \ndef adminpage():\n db.comment.truncate()\n redirect('index.html')\n\ndef imagetemplate():\n return dict()\n \ndef download():\n return response.download(request, db)\n\nresponse._vars=response._caller(download)\n"
p6
sS'traceback'
p7
S'Traceback (most recent call last):\n File "/home/acrowe/lib/python/web2py/gluon/restricted.py", line 178, in restricted\n exec ccode in environment\n File "/home/acrowe/lib/python/web2py/applications/turtle_art_images/controllers/default.py", line 41, in <module>\n File "/home/acrowe/lib/python/web2py/gluon/globals.py", line 96, in <lambda>\n self._caller = lambda f: f()\n File "/home/acrowe/lib/python/web2py/applications/turtle_art_images/controllers/default.py", line 39, in download\n return response.download(request, db)\n File "/home/acrowe/lib/python/web2py/gluon/globals.py", line 195, in download\n (filename, stream) = field.retrieve(name)\n File "/home/acrowe/lib/python/web2py/gluon/sql.py", line 2731, in retrieve\n return (filename, open(os.path.join(path, name), \'rb\'))\nIOError: [Errno 2] No such file or directory: \'/home/acrowe/lib/python/web2py/applications/turtle_art_images/databases/../uploads/comment.file.a0770985fc7c7edf.747572746c65617274746573742e7461.ta\'\n'
p8
s.
|