Sublime Text 3:将制表符转换为空格时出错

时间:2018-10-17 18:44:09

标签: sublimetext3 sublimetext

当我尝试从菜单将制表符转换为空格时出现此错误:

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上进行了设置,也没有设置“制表符宽度”。

enter image description here

Sublime Text版本3.1.1,内部版本3176 ,可在 Windows 10 Pro 上运行。

0 个答案:

没有答案