AppEngine appcfg.py complains about wrong version - google-app-engine

I have updated the AppEngine SDK for Python on my Mac to version 1.9.74.266.
I need to update a Python 2.7 Standard Environment App via appcfg.py (which is called from a complex build script updating multiple App Engine applications) but I get the following error:
Error 401
Your version of the AppEngine SDK is out-of-date. Please update your SDK ...
But this is what I just did.
What's wrong?

Related

Error installing Google cloud SDK on Windows 10

Whenever I try installing the google cloud sdk, I get the following error:
Do you want to help improve the Google Cloud SDK (y/N)? n
ERROR: (gcloud.components.list) The provided path must exist.
Activate code page: 437
Google Cloud SDK installer will now exit.
I'm using the latest version (299.0.0) and python3. I've tried older versions too. I am not sure what the problem is here.

AssertionError constantly appearing when I try to use on Google App Engine SDK

The following error keeps appearing whenever I try to do
dev_appserver.py app.yaml
File "/Users/monikap/Desktop/test-dir/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 95, in
assert sys.version_info[0] == 2
AssertionError
I have Python version 3.7 installed on my Mac
The development server still needs python 2 installed, even for python 3 apps, see Python 3.7 Local Development Server Options for new app engine apps
Python3 now has GA support on Cloud SDK.
I think you need to update your Cloud SDK with gcloud components update.

Deploy ASP.NET Core 2.1 app to Google Cloud App Engine error: bad character range

When I try to publish an ASP.NET Core 2.1 Web Application to Google Cloud Platform App Engine I get the error gcloud crashed (error): bad character range.
I publish with the GCP Visual Studio 2017 extension and I get the above error.
I publish from the cmd with an app.yaml in my project and I get the above error.
In order to deploy the ASP.NET Core 2.1 web application to Google Cloud App Engine I added an app.yaml file with the following contents:
runtime: aspnetcore
env: flex
I did the following:
Added app.yaml with
runtime: aspnetcore
env: flex
Added it to csproj
<ItemGroup>
<None Include="app.yaml" CopyToOutputDirectory="Always" />
</ItemGroup>
And executed the command
gcloud beta app deploy ./bin/release/netcoreapp2.1/publish/app.yaml
However I got the error: gcloud crashed (error): bad character range
Anyone know what I am doing wrong?
I follow the following guide and still get the same error when I try method 1, 2 and 3: https://cloudplatform.googleblog.com/2017/10/4-ways-you-can-deploy-an-ASP.NET-Core-app-to-GCP.html
This issue is being investigated at the moment and a fix should be released soon. As a workaround, please downgrade your Cloud SDK version to 212.0.0 by running the following command:
gcloud components update --version 212.0.0
Downgrading the version of your Cloud SDK to 212.0.0 or lower works because it seems in version 213.0.0 some changes were implemented that caused an issue with the yaml parser used by gcloud.
In addition, please follow this Issue Tracker thread to get updates regarding the status of this issue.
You should navigate to the publish directory first and deploy from there. Make sure the app.yaml file is present in the publish directory.
dotnet publish -c Release
cd ./bin/Release/netcoreapp2.1/publish
gcloud app deploy

How to use ujson with Google App Engine

According to the official list of built-in libraries, ujson is available. However, the following app.yaml snippet:
libraries:
- name: ujson
version: '1.35'
...generates this error:
Usage: appcfg.py [options] update <directory> | [file, ...]
appcfg.py: error: Error parsing ./app.yaml: the library "ujson" is not supported
in "./app.yaml", line 89, column 1.
If I try to use other supported C libraries like numpy, it works fine. I am running SDK 159.0.0 (latest) and can even see a "ujson" entry in google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/api/appinfo.py.
Any clue why ujson isn't usable?
ujson v1.35 was added to the app engine runtime in Python SDK version 1.9.55.
This sdk version wasn't included in the gcloud sdk until v161.0.0 (2017-06-28):
Updated App Engine components for Python to version 1.9.55. Please visit the release notes for details
Anecdote:
Some of us still prefer appcfg.py update . instead of gcloud app deploy app.yaml.(We are a rare and dying breed :D).
So in the past I noticed that the appcfg.py tool I was using was an older version from the older app engine tooling. Doesn't come with all the gcloud components update awesomeness. You had to download the binaries each time.
which appcfg.py should reveal the exact one being used which for me was:
$ ~/google_appengine/appcfg.py
I can't say I wasn't warned enough. Besides, I kept seeing this advice/warning each time I ran gcloud components update:
WARNING: There are older versions of Google Cloud Platform tools on your system PATH.
Please remove the following to avoid accidentally invoking these old tools:
/Users/jeff/google_appengine/endpointscfg.py
/usr/local/bin/endpointscfg.py
/Users/jeff/google_appengine/dev_appserver.py
So update to the latest version, update your paths to point to the right appcfg, and enjoy ujson or any of the goodies as and when they drop.
$ ~/google-cloud-sdk/platform/google_appengine/appcfg.py update .

Jaikuengine running locally on Windows with Google App Engine SDK

Has anyone succeeded in getting an instance of jaikuengine running locally on Windows using the Google App Engine SDK and the latest jaikuengine SVN code?
just got it upp and running - easy as a breeze...
Python 2.54, Latest svn, GAE SDK and docutils.. that's all..
//matt

Resources