I have downaloded and installed Python 2.7.6 in my Windows and I have also installed the latest version of the GAE SDK for Windows as well.
I have the following configurations on my GAE:
I am running an Hello World project with the following files:
Main.py
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello world!')
app = webapp2.WSGIApplication([('/', MainHandler)], debug=True)
app.yaml
application: HelloWorld
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
However, When I click the button Run, in order to runt he project, I get the following errors in the LOG output:
2013-12-04 14:51:49 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', 'D:\\Users\\pedro\\Desktop\\HelloWorld']"
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 197, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 193, in _run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 872, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 865, in main
dev_server.start(options)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 657, in start
options.yaml_files)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 549, in __init__
module_configuration = ModuleConfiguration(yaml_path)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 82, in __init__
self._yaml_path)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 266, in _parse_configuration
return appinfo_includes.ParseAndReturnIncludePaths(f)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\appinfo_includes.py", line 63, in ParseAndReturnIncludePaths
appyaml = appinfo.LoadSingleAppInfo(appinfo_file)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\appinfo.py", line 1756, in LoadSingleAppInfo
listener.Parse(app_info)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\yaml_listener.py", line 226, in Parse
self._HandleEvents(self._GenerateEventParameters(stream, loader_class))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\yaml_listener.py", line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: Unable to assign value 'HelloWorld' to attribute 'application':
Value 'HelloWorld' for application does not match expression '^(?:(?:[a-z\d\-]{1,100}\~)?(?:(?!\-)[a-z\d\-\.]{1,100}:)?(?!-)[a-z\d\-]{0,99}[a-z\d])$'
in "D:\Users\pedro\Desktop\HelloWorld\app.yaml", line 1, column 14
2013-12-04 14:51:50 (Process exited with code 1)
Thus I have the following questoins:
Thanks for any help if possible :S
According to the regex that isn't matching, the app name needs to be lowercase:
>>> regex = r'^(?:(?:[a-z\d\-]{1,100}\~)?(?:(?!\-)[a-z\d\-\.]{1,100}:)?(?!-)[a-z\d\-]{0,99}[a-z\d])$'
>>> print(re.match(regex, 'HelloWorld'))
None
>>> print(re.match(regex, 'helloworld'))
<_sre.SRE_Match object at 0x13ac308>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With