[Trouble Shooting - Python] ValueError: source code string cannot contain null bytes

时间:2018-01-14 10:57:26   收藏:0   阅读:1714

1. Background: python 3/win10

2.Error Line: import custom_python

  • custom_python.py 是通过re.findall()返回的list强行转换成的dict

3. Solution

  •  把custom_python.py用notepad打开后,保存被UTF-8(本来是unicode)

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!