使用with读取文件,并去掉末尾的换行符
1 | with open(filename) as f: |
Python实现钉钉发送报警消息
[‘utf8’ codec can’t decode byte 0xe1 in position 25: invalid
continuation byte](https://stackoverflow.com/questions/19872773/unicodedecodeerror-while-using-json-dumps)
1 | with open(filename) as f: |
continuation byte](https://stackoverflow.com/questions/19872773/unicodedecodeerror-while-using-json-dumps)