ImportError: cannot import name api_backend_service

132 views
Skip to first unread message

Michael Spainhower

unread,
Feb 15, 2017, 1:48:04 AM2/15/17
to Ferris Framework
Hello

I am updating a ferris project to use the `vendor` function in `google.appengine.ext`, but for some reason get an odd import error in endpoints via ferris:

$ dev_appserver.py app-local-dev.yaml 
INFO     2017-02-15 06:41:45,784 devappserver2.py:764] Skipping SDK update check.
INFO     2017-02-15 06:41:45,825 api_server.py:268] Starting API server at: http://localhost:36749
INFO     2017-02-15 06:41:45,932 dispatcher.py:199] Starting module "default" running at: http://localhost:8080
INFO     2017-02-15 06:41:45,933 admin_server.py:116] Starting admin server at: http://localhost:8000
INFO     2017-02-15 06:41:50,744 __init__.py:16] Ferris 3: endpoints library not available.
ERROR    2017-02-15 06:41:50,745 wsgi.py:263] 
Traceback (most recent call last):
  File "/home/spainhower/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/home/spainhower/google-cloud-sdk/platform/google_appengine/google/appengine/api/lib_config.py", line 351, in __getattr__
    self._update_configs()
  File "/home/spainhower/google-cloud-sdk/platform/google_appengine/google/appengine/api/lib_config.py", line 287, in _update_configs
    self._registry.initialize()
  File "/home/spainhower/google-cloud-sdk/platform/google_appengine/google/appengine/api/lib_config.py", line 160, in initialize
    import_func(self._modname)
  File "/home/spainhower/repos/hz-web-api/appengine_config.py", line 8, in <module>
    import endpoints_config
  File "/home/spainhower/repos/hz-web-api/endpoints_config.py", line 1, in <module>
    from ferris3 import endpoints
  File "/home/spainhower/repos/hz-web-api/lib/ferris3/endpoints.py", line 4, in <module>
    import endpoints
  File "/home/spainhower/google-cloud-sdk/platform/google_appengine/lib/endpoints-1.0/endpoints/__init__.py", line 35, in <module>
    from apiserving import *
  File "/home/spainhower/google-cloud-sdk/platform/google_appengine/lib/endpoints-1.0/endpoints/apiserving.py", line 72, in <module>
    from endpoints import api_backend_service
ImportError: cannot import name api_backend_service


To troubleshoot, I used the yeoman generator to create a fresh ferris3 project and updated it to use the `vendor` function in `google.appengine.ext`.  It worked correctly.  I then started copying files in the traceback from the fresh working project to the offending project to no avail. `diff`ing main.py, appengine_config.py, and endpoints_config.py are all empty (as well as diffing the ferris3 files).

I am running out of troubleshooting ideas, so any thoughts or hints as to what is going on are appreciated.

--Spain
Reply all
Reply to author
Forward
0 new messages