Sadece google uygulama motorundan başlıyorum ve google uygulama motorunda temel merhaba dünyası örneğini izledim.Google app engine dev_appserver.py sorunları
https://developers.google.com/appengine/docs/python/gettingstartedpython27/helloworld
helloworld klasöründe iki dosya oluşturulur.
GUI'yi kullanmak istemiyorum, bu uygulama ile çalışmak için mac terminalini kullanmayı tercih ediyorum. Bu uygulamayı yerel ana bilgisayarımdaki (localhost) 80: terminale başlatmak istiyorum.
lokal bütün ı$ dev_appserver.py helloworld olduğunu söylemek benim temel helloworld uygulamayı çalıştırmak için. ama bu hatayı alıyorum.
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 184, in <module>
_run_file(__file__, globals())
File "/usr/local/bin/dev_appserver.py", line 180, in _run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 727, in <module>
main()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 720, in main
dev_server.start(options)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 554, in start
options.yaml_files)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 556, in __init__
module_configuration = ModuleConfiguration(yaml_path)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 82, in __init__
self._yaml_path)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 271, in _parse_configuration
with open(configuration_path) as f:
IOError: [Errno 2] No such file or directory: 'helloworld'
Helloworld dizininde iki dosyam var. app.yaml
application: your-app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.application
ve helloworld.py
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.write('Hello, World!')
application = webapp2.WSGIApplication([
('/', MainPage),
], debug=True)
hata yok dosyayı diyor veya dizin. Helloworld dizini, komutta çalıştırdığınız dizinde var mı ve içinde bir app.yaml var mı? –
Gerçekten de yazımı içindeki iki dosyayla güncelledim. Dev_appserver.py'yi çalıştırmadan önce dizine cd yazmayı tamamladım ama yine de iyi değil. – muhammed
Eğer "helloworld" dizinine cd yazarsanız o zaman komut dev_appserver.py olmalıdır. Argüman app.yaml içeren dizinin yoludur. Eğer o dizinde iseniz o zaman yol geçerli dir ya da '.' için tam yoldur. –