AppEngine: No module named pyasn1.compat.binary

后端 未结 1 351
独厮守ぢ
独厮守ぢ 2021-01-24 02:50

I keep getting the following error when hitting my AppEngine server:

ERROR    2017-09-20 07:16:06,978 wsgi.py:263] 
Traceback (most recent call last):
  File \"/         


        
相关标签:
1条回答
  • 2021-01-24 03:53

    Lots of thanks to Dan Cornilescu! It turns out that my app.yaml config was the culprit, specifically the skip_files directive.

    The bad config looked like:

    skip_files:
    - ^(.git/.*)
    - ^.*bin(/.*)?
    - ^.*node_modules(/.*)?
    - ^.*public(/.*)?
    - ^.*src(/.*)?
    - ^env$
    - ^(.*/)?.*\.pyc$
    

    The updated config looks like:

    # Skip any non-essential files for uploading during deploys.
    skip_files:
    # Defaults, see: https://cloud.google.com/appengine/docs/standard/python/config/appref#skip_files/
    - ^(.*/)?#.*#$
    - ^(.*/)?.*~$
    - ^(.*/)?.*\.py[co]$
    - ^(.*/)?.*/RCS/.*$
    - ^(.*/)?\..*$
    # Custom
    - ^(.*/)?.*/bin/.*$
    - ^(.*/)?.*/env/.*$
    - ^(.*/)?.*/none_modules/.*$
    - ^(.*/)?.*/public/.*$
    - ^(.*/)?.*/src/.*$
    

    So a combo of bad regex and skipping the wrong files broke the local app server, and fixing it got it up and running again.

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