سؤال

I have an app running on GAE, using reportlab to email generated PDF's. When I run my reportlab app on localhost everything works perfectly. But when I run it after deploying, it throws out an error.

Error

IOError: Cannot open resource "/base/data/home/apps/myapp/1.375717494064852868/static/img/__.jpg"

Line

img=[ [Image(os.path.join(os.path.dirname(os.path.abspath(file)), 'static/img/__.jpg'))] ]

app.yaml

-url: /static/img
 static_dir: static/img

هل كانت مفيدة؟

المحلول

If you want to access files from your application code that are covered by a static-file route in your app config, you need to set application_readable to true. Or, you can move/copy the file somewhere else in your project.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top