码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2018-01-14 10:57:26      阅读:1714      评论:0      收藏:0      [点我收藏+]

标签:import   python   class   notepad   保存   bytes   error:   str   ann   

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)

 

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

标签:import   python   class   notepad   保存   bytes   error:   str   ann   

原文地址:https://www.cnblogs.com/break-dawnn/p/8282308.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!