Forums

pythonanywhere server issue? file not synchronized...

hi pythonanywhere team, please help to check , I've already modified the source code..and reloaded.but according to the server error log. the runing code is still old... pls help

Are you sure that you've set up the sys.path and imports correctly?

i am pretty sure.

nobody help? view.py :

@app.route('/decode.do', methods=['POST'])
def dodecode():
    #print request
    #f = request.files['the_image']
    #Image.open(f).save("/tmp/vercode.jpeg")
    return "out of date!"
#return AntiGate('f0e100d3ac7768fb9ffaf47e54e4b855', '/tmp/vercode.jpeg').get()

error.log:

2013-10-01 14:04:48,840 :Exception on /decode.do [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/verdecoder/mysite/antigateglue/antigateglue/views.py", line 53, in dodecode
    return AntiGate('f0e100d3ac7768fb9ffaf47e54e4b855', 'vercode.jpeg').get()
  File "/home/verdecoder/.local/lib/python2.7/site-packages/antigate-1.2-py2.7.egg/antigate/__init__.py", line 33, in __init__
    self.run(filename)
  File "/home/verdecoder/.local/lib/python2.7/site-packages/antigate-1.2-py2.7.egg/antigate/__init__.py", line 140, in run
    self.send(filename)
  File "/home/verdecoder/.local/lib/python2.7/site-packages/antigate-1.2-py2.7.egg/antigate/__init__.py", line 93, in send
    raise AntiGateError(msg)
AntiGateError: ERROR_KEY_DOES_NOT_EXIST
2013-10-02 03:19:48,867 :Exception on /decode.do [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/verdecoder/mysite/antigateglue/antigateglue/views.py", line 53, in dodecode
    return AntiGate('f0e100d3ac7768fb9ffaf47e54e4b855', 'vercode.jpeg').get()
  File "/home/verdecoder/.local/lib/python2.7/site-packages/antigate-1.2-py2.7.egg/antigate/__init__.py", line 33, in __init__
    self.run(filename)
  File "/home/verdecoder/.local/lib/python2.7/site-packages/antigate-1.2-py2.7.egg/antigate/__init__.py", line 140, in run
    self.send(filename)
  File "/home/verdecoder/.local/lib/python2.7/site-packages/antigate-1.2-py2.7.egg/antigate/__init__.py", line 93, in send
    raise AntiGateError(msg)
AntiGateError: ERROR_KEY_DOES_NOT_EXIST
2013-10-02 23:20:13,825 :IOError: write error
2013-10-02 23:20:13,908 :RuntimeError: generator ignored GeneratorExit

what happened?

edit by admin for formatting

Are you really sure that you're editing the correct file? In the traceback, I see:

/home/verdecoder/mysite/antigateglue/antigateglue/views.py

The double antigateglue/antigateglue in the path is often an indication that the wrong file is in use and since you didn't give the full path to views.py, it's difficult to tell.

oh, sorry, you are right..but i did not remember why there is a copy of the project files..

thanks a lot