I am getting an error message when trying to run my Python API via the Google App Engine Launcher. I'm following a set of instructions by "Ashutosh KS" to launch a website on the Google Server that I found at http://www.hongkiat.com/blog/host-website-google-server/. I get the error message below when I run the App.yaml file.
google.appengine.api.yaml_errors.EventListenerYAMLError: 'utf8' codec can't decode byte #x96: invalid start byte in "C:\healygeoscience\app.yaml", position 99 2015-02-17 01:48:53 (Process exited with code 1)
When I attempt to deploy the API, I also get the following error.
appcfg.py: error: Error parsing C:\healygeoscience\app.yaml: 'utf8' codec can't decode byte #x96: invalid start byte in "C:\healygeoscience\app.yaml", position 99. 2015-02-17 01:50:04 (Process exited with code 2)
My App.yaml file is as follows:
application: healygeoscience version: 1 runtime: python27 api_version: 1 threadsafe: yes
handlers: – url: / static_files: www/index.html upload: www/index.html
– url: / static_dir: www
libraries: – name: webapp2 verssion: "2.5.2"
The website is a single page website based on the Ceevee template from http://www.styleshout.com/demo/?theme=ceevee., which I edited with TextPad. The website is operational when run locally, although I have to refresh several times to get all images to appear - possibly significant ?
From reading other questions on Stackoverflow, I realise that the error is due to an issue of encoding, and am wondering if the statement on line 8 in the header section of the index.html file is significant. Some posts suggest decode from charset=ISO-8859-1 to unicode. Can you explain and offer code? From TextPad, I have saved index.html file in UTF-8 and Unicode, and from WordPad I saved App.yaml to Unicode Text Document , but error persists!
Does position 99 refer to line numbers, and if so, does this include the fourteen lines of code in App.yaml, and also include blank lines in App.yaml and index.html? How do I locate the string with #x96.
I suspect a lot of novices trying to set up personal and business websites will encounter this issue, so it would probably be very beneficial if someone could offer some advice to a complete Python novice.
RaymondHealy