My code is giving error:
2018-07-12 16:56:04,645: [2018-07-12 16:56:04,639] ERROR in app: Exception on /file [POST]
2018-07-12 16:56:04,646: Traceback (most recent call last):
2018-07-12 16:56:04,646: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
2018-07-12 16:56:04,646: response = self.full_dispatch_request()
2018-07-12 16:56:04,646: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
2018-07-12 16:56:04,646: rv = self.handle_user_exception(e)
2018-07-12 16:56:04,646: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
2018-07-12 16:56:04,647: reraise(exc_type, exc_value, tb)
2018-07-12 16:56:04,647: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
2018-07-12 16:56:04,647: rv = self.dispatch_request()
2018-07-12 16:56:04,647: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
2018-07-12 16:56:04,647: return self.view_functions[rule.endpoint](**req.view_args)
2018-07-12 16:56:04,648: File "/home/jk1997/mysite/app.py", line 60, in index
2018-07-12 16:56:04,648: filepath=os.path.join(app.config['UPLOAD_FOLDER'], filename)
2018-07-12 16:56:04,648: File "/usr/local/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 2653, in save
2018-07-12 16:56:04,648: dst = open(dst, 'wb')
2018-07-12 16:56:04,648: IOError: [Errno 2] No such file or directory: '/home/simmi/student.csv'
2018-07-12 16:56:04,639: Exception on /file [POST]#012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app#012 response = self.full_dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request#012 rv = self.handle_user_exception(e)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception#012 reraise(exc_type, exc_value, tb)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request#012 rv = self.dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request#012 return self.view_functions[rule.endpoint](**req.view_args)#012 File "/home/jk1997/mysite/app.py", line 60, in index#012 filepath=os.path.join(app.config['UPLOAD_FOLDER'], filename)#012 File "/usr/local/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 2653, in save#012 dst = open(dst, 'wb')#012IOError: [Errno 2] No such file or directory: '/home/simmi/student.csv'
Tried this solution but it did not work
[edit by admin: formatting]