I'm working on an application that takes a Turtle Art (.ta) file, runs
it, creates a .png of the result, and displays it in a table. So far I
can create the .png and it's placed in the uploads folder with the
same name as the original .ta file but when i try to run

    session.new_image = form.vars.file
    session.new_image_title = form.vars.title

    file_name_length = len(session.new_image)
    os.system('python applications/turtle_art_images/modules/
PngGenerator.py applications/turtle_art_images/
uploads/'+session.new_image)
 
db(db.comment.title==session.new_image_title).update(newimage=os.system('applications/
turtle_art_images/uploads/'+session.new_image[0:(file_name_length-2)]
+'png'))
    return dict()

where form.vars.file is the uploaded .ta file

I get the errors:

ERROR:Rocket.Errors.ThreadPool:Traceback (most recent call last):
  File "/home/acrowe/lib/python/web2py/gluon/rocket.py", line 297, in
start
    listeners = [poll_dict[x[0]] for x in poll.poll(POLL_TIMEOUT)]
IOError: [Errno 4] Interrupted system call

sh: applications/turtle_art_images/uploads/
comment.file.b6b8aa42563d3b8c.747572746c65617274746573742e7461.png:
Permission denied
ERROR:Rocket.Errors.ThreadPool:Traceback (most recent call last):
  File "/home/acrowe/lib/python/web2py/gluon/rocket.py", line 297, in
start
    listeners = [poll_dict[x[0]] for x in poll.poll(POLL_TIMEOUT)]
IOError: [Errno 4] Interrupted system call


and I'm totally lost as to why. Any ideas?

Reply via email to