2

Package Control 多年来一直在 OS X (MacOS) 中的 Sublime Text 3 上运行良好。但是,现在当我尝试从命令面板启动包控制时,它的所有命令都丢失了。

我尝试在https://packagecontrol.io/installation上使用 ST3 的安装代码再次安装 Package Control 。重新启动 Sublime Text 但这无济于事。

下载Package Control.sublime-package并将其放入/Users/user/Library/Application\ Support/Sublime\ Text\ 3/Packages 并重新启动 Sublime Text,但问题仍然存在。

在 下Sublime Text > Preference > Setting - User,包控制未在 下列出"ignored_packages"

有人遇到同样的问题吗?


启动过程中的错误

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 74, in reload_plugin
    m = importlib.import_module(modulename)
  File "./importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "2_bootstrap in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 26, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "package_control.bootstrap in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 23, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "package_control.loader in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 57, in <module>
  File "./posixpath.py", line 83, in join
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
reloading plugin Package Control.Package Control
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 74, in reload_plugin
    m = importlib.import_module(modulename)
  File "./importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "Package Control in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/Package Control.sublime-package", line 14, in <module>
  File "./posixpath.py", line 83, in join
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
plugins loaded
4

1 回答 1

1

在linux Mint上(全新)安装后,我遇到了完全相同的类型错误问题。使用安装 3103 版本的 apt-get。Sublime 建议在启动时安装更新版本。在阅读了大量的说明和很少的重新安装后,我决定获取最新版本(尽管 apt-get 不可用)。

通过安装 3143 版本,并按照 Sergey 的这些说明进行一些修改,我得到了 Package control 的工作。我没有挖掘出真正的根本原因,但这为我解决了同样的问题。

apt-get 删除现有安装后,我通过以下方式获得了最新软件:

# wget http://download.sublimetext.com/sublime_text_3_build_3143_x64.tar.bz2

解压到/opt/sublime_text_3并创建一个文本文件。

# nano /usr/bin/subl

包含:

#!/bin/sh
exec /opt/sublime_text_3/sublime_text "$@"

使其可执行。

# chmod 777 /usr/bin/subl

通过执行从命令行运行:subl启动新安装的版本。

于 2017-12-01T19:12:32.913 回答