By using the webapi and consuming / messages / msg_id / download
I get a 500 error, checking the error indicates that the file does not exist
Ejm: /home/mkws/w/sample/flask/static/1/140316231645224.jpe
if I check the path I can see that the file was downloaded correctly.
`Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/mkws/w/sample/flask/webapi.py", line 166, in decorated_function
return f(*args, **kwargs)
File "/home/mkws/w/sample/flask/webapi.py", line 638, in download_message_media
return send_file(filename, mimetype=message.mime)
File "/usr/local/lib/python3.7/dist-packages/flask/helpers.py", line 629, in send_file
file = open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/mkws/w/sample/flask/static/1/140316231645224.jpe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1879, in handle_exception
server_error = handler(server_error)
File "/home/mkws/w/sample/flask/webapi.py", line 491, in on_bad_internal_server_error
raise e
werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.`
By using the webapi and consuming / messages / msg_id / download I get a 500 error, checking the error indicates that the file does not exist Ejm: /home/mkws/w/sample/flask/static/1/140316231645224.jpe
if I check the path I can see that the file was downloaded correctly.
`Error on request: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "/home/mkws/w/sample/flask/webapi.py", line 166, in decorated_function return f(*args, **kwargs) File "/home/mkws/w/sample/flask/webapi.py", line 638, in download_message_media return send_file(filename, mimetype=message.mime) File "/usr/local/lib/python3.7/dist-packages/flask/helpers.py", line 629, in send_file file = open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: '/home/mkws/w/sample/flask/static/1/140316231645224.jpe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 323, in run_wsgi execute(self.server.app) File "/usr/local/lib/python3.7/dist-packages/werkzeug/serving.py", line 312, in execute application_iter = app(environ, start_response) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2464, in call return self.wsgi_app(environ, start_response) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2450, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1879, in handle_exception server_error = handler(server_error) File "/home/mkws/w/sample/flask/webapi.py", line 491, in on_bad_internal_server_error raise e werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.`