App Engine not finding google.auth file in dev_appserver.py

前端 未结 2 1712
失恋的感觉
失恋的感觉 2021-01-25 11:49

I\'m receiving the following error when executing the dev_appserver.py:

from google.auth import app_engine
File \"/google/google-cloud-sdk/platform/google_appeng         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-01-25 12:17

    https://github.com/GoogleCloudPlatform/google-auth-library-python/issues/169#issuecomment-315417916

    I solved this issue by above comment:

    Yes, I have the following in appengine_config.py:

    from google.appengine.ext import vendor
    
    vendor.add('lib')
    

    I managed to resolve the module loading issue by using the following instead:

    appengine_config.py

    import os
    import google
    from google.appengine.ext import vendor
    
    lib_directory = os.path.dirname(__file__) + '/lib'
    
    # Change where to find the google package (point to the lib/ directory)
    google.__path__ = [os.path.join(lib_directory, 'google')] + google.__path__
    
    # Add any libraries install in the "lib" folder.
    vendor.add(lib_directory)
    

提交回复
热议问题