问题如下:
station.py里面是python字典,我现在将station.py作为模块导入另一个模块中执行,出现了错误。
from stations import stations
ValueError: source code string cannot contain null bytes
是valueerror,我找了一下出现这错误的都是typeerror,请问大家知道如何解决吗?
win7;模块导入正确;station里面只有一个字典。
谢谢==。
问题如下:
station.py里面是python字典,我现在将station.py作为模块导入另一个模块中执行,出现了错误。
from stations import stations
ValueError: source code string cannot contain null bytes
是valueerror,我找了一下出现这错误的都是typeerror,请问大家知道如何解决吗?
win7;模块导入正确;station里面只有一个字典。
谢谢==。
4 回答970 阅读
1 回答714 阅读
1 回答696 阅读
1 回答522 阅读
643 阅读
586 阅读
569 阅读
2.9k 阅读
1 回答9.8k 阅读
8.6k 阅读
1 回答18.2k 阅读
2 回答8.8k 阅读✓ 已解决
使用下面的命令,去除
stations.py文件中的null字符。这可能是你的文本编辑器错误引入的。在这里则为:
补充,考虑到你是win系统,没有sed命令;建议你将文件中内容复制在其他地方,再重新复制回去。