Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/errors/127.0.0.1.2010-06-11.09-29-18.0e1af70f-b279-4891-8c56-e7c1cd44a3c4
blob: 1fd7b2a7eefaaa079a7ca3d89d7ca89dbaff06e6 (plain)
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\ndef index():\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      session.new_image = form.vars.file\n      session.new_image_title = form.vars.title\n      redirect(URL(r=request, f='jamiesprogram')) \n    elif form.errors:\n      response.flash = 'form has errors'\n    return dict(form=form)\n\ndef jamiesprogram():\n    file_name_length = len(session.new_image)\n    print session.new_image\n    print file_name_length\n    os.system('python applications/turtle_art_images/modules/PngGenerator.py applications/turtle_art_images/uploads/'+session.new_image)\n    db().insert(newimage=os.system('applications/turtle_art_images/uploads/'+session.new_image[0:(file_name_length-2)]+'png'))\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(jamiesprogram)\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 24, in jamiesprogram\n    db().insert(newimage=os.system(\'applications/turtle_art_images/uploads/\'+session.new_image[0:(file_name_length-2)]+\'png\'))\nAttributeError: \'Set\' object has no attribute \'insert\'\n'
p8
s.