我已经在谷歌应用引擎中成功部署了我的python with bottle framework应用程序,但是,我遇到了一个最特殊的错误。
每当我尝试打开文件进行编写时,我都会收到错误
Error: 500 Internal Server Error
Sorry, the requested URL 'http://issamcodemate.appspot.com/' caused an error:
Internal Server Error
当我在服务器端执行以下任何语句时会发生这种情况,
f = open("Files/currentFile.txt",'r+')
f = open("Files/currentFile.txt",'w')
f = open("Files/currentFile.txt",'a')
奇怪的是,当我执行此代码时,它工作正常,
f = open("Files/currentFile.txt",'r')
但这只是为了阅读...
提前致谢..
答案 0 :(得分:3)
您无法在GAE中写入本地文件系统。使用blobstore或Google云端存储。