gpt4 book ai didi

Python 库 (foundation\FormParameters.py) 错误

转载 作者:太空宇宙 更新时间:2023-11-04 06:35:35 24 4
gpt4 key购买 nike

我在 IDLE 中输入的第一行是

from foundation import FormParameters

我得到这样的错误

>>> from foundation import FormParameters
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from foundation import FormParameters
File "C:\Python32\lib\foundation\FormParameters.py", line 19
con_str = StringIO()
^
TabError: inconsistent use of tabs and spaces in indentation

因为它是标准库,我可以更改它吗?还是有其他办法??

最佳答案

As it is a standard library can i change it?

您可以只打开引用的文件(“C:\Python32\lib\foundation\FormParameters.py”)并对其进行编辑 - 在这种情况下,我建议用空格替换制表符,因为制表符和 python 是一个邪恶的组合。

正如其他一些人评论的那样,这不是标准库的一部分 - 但即使是,同样的规则也适用 - 找到该文件,你可以自由编辑它(你可能不应该,如果你打算使用未修改的标准库在其他机器上运行您的程序)。对于 C 扩展,此过程稍微复杂一些,因为您需要编译它们。

关于Python 库 (foundation\FormParameters.py) 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11773516/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com