UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)

后端 未结 2 934
名媛妹妹
名媛妹妹 2020-12-12 15:33

I am building a web application using Flask and Google App Engine. One of the pages in this web application makes a call via YouTube APIs to get videos given a search term.

2条回答
  •  旧巷少年郎
    2020-12-12 15:48

    Figured it out.

    I put the following at the start of my python file

    import sys
    reload(sys)
    sys.setdefaultencoding("utf-8")
    

提交回复
热议问题