Tuesday 17 March 2015

How To Fix Sublime Text Package Control Message Tab Bug ?

I don't want to introduce Sublime Text to the programmers as it is one of the most used text editor among programmers. Since last few days, a frequent package control message appears while I am typing in the Sublime text and the focus goes to the package control message tab. Closing the message tab is enough to get rid of it but, sometimes it feels really frustrating as it comes continuously back to back.

There is a related issue posted in Emmet-Sublime Github page and which got fixed by reinstalling the Emmet plugin as his issue was related to Emmet plugin. You can find your actual issue by reading the Package control message. In my case it was related to the package control. Here is the message I got in the Package Control Message tab.

Package Control Messages
========================

Package Control:
---------------

Version 3.0 Release Notes


**** Windows Sublime Text 3 Users ****

Due to a bug in Package Control 2.0, Windows ST3 users will need to open the
Sublime Text console (ctrl+`) and execute the following Python to properly
upgrade. All other users may ignore this part of the message.

Make sure NOT to copy the leading two spaces, or an "unexpected indent" error
will occur.

import urllib.request,os,sys; exec("if sys.version_info < (3,) or os.name != 'nt': raise OSError('This code is for Windows ST3 only!')"); pr='Preferences.sublime-settings'; ip='ignored_packages'; n='Package Control'; s=sublime.load_settings(pr); ig=s.get(ip); ig.append(n); s.set(ip,ig); sublime.save_settings('Preferences.sublime-settings'); pf=n+'.sublime-package'; urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler())); by=urllib.request.urlopen('https://packagecontrol.io/'+pf.replace(' ','%20')).read(); open(os.path.join(sublime.installed_packages_path(),pf),'wb').write(by); ig.remove(n); s.set(ip,ig); sublime.save_settings(pr); print('Package Control: 3.0.0 upgrade successful!')




As mentioned in the message I upgraded the Package Control using the provided Python script and it got fixed.

Here is the complete steps to upgrade Sublime Text Package Control


1. Copy the Python script.
2. Close the Package Control Message tab.
3. Press ctrl+`
4. Paste the script to the prompt box.
5. Finally, Hit Enter and Wait to finish.

That's it.

No comments:

Post a Comment