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

前端 未结 2 1711
失恋的感觉
失恋的感觉 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)
    
    0 讨论(0)
  • 2021-01-25 12:24

    I had very likely problem in from google.auth.crypt import base and I solved it, so you can try this.

    Go to the file that has the import problem, and change manually the:

    from google.auth import app_engine
    

    To the:

    import app_engine
    
    0 讨论(0)
提交回复
热议问题