Vinay Joseph
Vinay Joseph

Reputation: 5655

ERROR: (gcloud.preview.app.deploy) Error Response: [400] Invalid character in filename: flask/ext/setuptools/script (dev).tmpl

I am trying to launch my app into app engine using the following command.

gcloud --project=xxx preview app deploy app.yaml

I am then given the following error message

Updating module [default]...|
Updating module [default].../
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [400] Invalid character in filename: server/lib/flask/ext/setuptools/script (dev).tmpl
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Contents of Script (dev).tmpl

# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r
__requires__ = %(spec)r
__import__('pkg_resources').require(%(spec)r)
__file__ = %(dev_path)r
exec(compile(open(__file__).read(), __file__, 'exec'))

Questions

  1. What is Script (dev).tmpl
  2. Why am I getting this error.

updated based on the first response

I have added the following to app.yaml file.

skip_files: - server/lib/flask/ext/setuptools/script (dev).tmpl

However, it still gives me the same error.

Upvotes: 5

Views: 1028

Answers (3)

Eliel Haouzi
Eliel Haouzi

Reputation: 607

So the skip_files works you must antislash the special characters. Add this to your app.yaml

skip_files:
 - server/lib/flask/ext/setuptools/script\ \(dev\).tmpl

set your relative path according to your .yaml

Upvotes: 2

E.C.
E.C.

Reputation: 1

I know this is several months later, but I just set up a Google App Engine account and downloaded the SDK last week. I'm using the most recent Flask skeleton for GAE apps, and I was getting the same error about script (dev).tmpl. (The file is just in a different directory.)

I tried using skip_file, too, and it didn't work for me either. I looked up the documentation about skipping files, and I don't think it's meant for what we tried to use it for. I deleted it, and my little Hello World test deployed with no further errors. Hopefully when I build something more complex I won't run into any errors...

Upvotes: 0

Zachary Newman
Zachary Newman

Reputation: 21374

  1. script (dev).tmpl is a Flask-related file. Not terribly important for you to worry about as a Flask user.

  2. This error is related to a bug in gcloud. The next gcloud release (92.0.0) will fix it. In the mean time, you can work around by adding this file to the skip_files section in your app.yaml.

Upvotes: 1

Related Questions