amazon ec2 - Flask- Cannot read or write to file -


i using aws ec2 host flask application , trying read , write text file when user submits form using open() function. when form submitted getting error:

internal server error server encountered internal error , unable complete request. either server overloaded or there error in application.

i not sure why error happening.

the code is:
@app.route("/submit", methods=["post"])

def submit():      file = open("settingsfile.txt", "w")      file.close()  


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

gradle error "Cannot convert the provided notation to a File or URI" -