UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 3131: invalid start byte

前端 未结 3 2135
轮回少年
轮回少年 2020-12-11 01:19

I am trying to read twitter data from json file using python 2.7.12.

Code I used is such:

    import json
    import sys
    reload(sys)
    sys.setd         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-11 02:19

    In my case(mac os), there was .DS_store file in my data folder which was a hidden and auto generated file and it caused the issue. I was able to fix the problem after removing it.

提交回复
热议问题