Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 图像在本地工作,但一旦部署在谷歌应用程序引擎上就无法工作?_Python_Google App Engine - Fatal编程技术网

Python 图像在本地工作,但一旦部署在谷歌应用程序引擎上就无法工作?

Python 图像在本地工作,但一旦部署在谷歌应用程序引擎上就无法工作?,python,google-app-engine,Python,Google App Engine,我有一个app.yaml文件,如下所示: application: segmentize version: 1 runtime: python27 api_version: 1 threadsafe: true handlers: - url: /css static_dir: css - url: /img(.*\.(gif|png|jpg)) static_files: img/\1 upload: img(.*\.(gif|png|jpg)) - url: / scr

我有一个app.yaml文件,如下所示:

application: segmentize
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /css
  static_dir: css

- url: /img(.*\.(gif|png|jpg))
  static_files: img/\1
  upload: img(.*\.(gif|png|jpg))

- url: /
  script: index.app

skip_files:
- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
- ^(.*/)?dev
- ^(.*/)?old_ver
- ^(.*/)?resources
所有图像都在局部显示良好。然而,一旦部署,它们就会显示为已损坏

html中的图像设置如下:

<img src="/img/welcomeimg.png">


在我部署时,图像是否只是不上传?这是什么原因造成的?css文件夹的部署似乎没有问题

url
upload
部分的
img
末尾添加斜杠:

- url: /img/(.*\.(gif|png|jpg))
  static_files: img/\1
  upload: img/(.*\.(gif|png|jpg))

应用程序引擎是区分大小写的文件系统,请检查它。我猜您没有使用
跳过\u文件
,但如果您使用。。你能把它也包括进去吗?@ShayErlichmen我查了所有的文件名。所有内容都是小写的。@Lipis我已经更新了我的问题以显示“跳过文件”部分。