当我尝试从菜单将制表符转换为空格时出现此错误:
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 1066, in run_
return self.run(edit, **args)
File "C:\Program Files\Sublime Text 3\Packages\Default.sublime-package\indentation.py", line 145, in run
File "C:\Program Files\Sublime Text 3\Packages\Default.sublime-package\indentation.py", line 83, in save_selections
File "C:\Program Files\Sublime Text 3\Packages\Default.sublime-package\indentation.py", line 83, in <listcomp>
File "C:\Program Files\Sublime Text 3\Packages\Default.sublime-package\indentation.py", line 83, in <listcomp>
File "C:\Program Files\Sublime Text 3\Packages\Default.sublime-package\indentation.py", line 57, in line_and_normed_pt
File "C:\Program Files\Sublime Text 3\Packages\Default.sublime-package\indentation.py", line 20, in normed_indentation_pt
File "C:\Program Files\Sublime Text 3\Packages\Default.sublime-package\indentation.py", line 6, in get_tab_size
TypeError: int() argument must be a string or a number, not 'NoneType'
它仅在.py文件中发生,例如以下一个:
from test import test
class TestClass(App):
def build(self):
pass
调用转换后未修改文件。
我还注意到,即使在配置"tab_size": 4
上进行了设置,也没有设置“制表符宽度”。
Sublime Text版本3.1.1,内部版本3176 ,可在 Windows 10 Pro 上运行。