Sublime Forum

Package Control not available

#1

Hello,

Package Control is in my Sublime 3 Build 3114 no longer available. Even when tryping to activate Package Control I receive the following error (package control did work fine for at least a year now) any idea ?

>>> 
>>> import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
186789
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 725, in _scan_zip
    self.contents[pkg_path] = z.read(f).decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 6000: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 750, in update_compressed_packages
    multi_importer.loaders.append(ZipLoader(p))
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 609, in __init__
    self._scan_zip()
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 728, in _scan_zip
    print(f, "in", zippath, "is not utf-8 encoded, unable to load plugin")
NameError: global name 'zippath' is not defined
0 Likes

#2

Looks like some changes in sublime_plugin.py broke the installation of .sublime-package files.

Try changing that zippath to self.zippath on that line.

2 Likes

#3

works fine … thx

changed line 728 to :
print(f, “in”, self.zippath, “is not utf-8 encoded, unable to load plugin”)
continue

0 Likes

#4

I have the same problem on OS X. Where can I find the file sublime_plugin.py on OS X so I can try replacing zippath by self.zippath on line 728?

0 Likes

#5

In the folder where ST is installed. In the console:

import os.path; os.path.dirname(sublime.executable_path())
3 Likes

#6

I’ll get this resolved in the next dev build.

0 Likes

#7

For those who have updated old ST3, They must uninstall first and then install new 3114 v ST3 to avoid
below errors:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 750, in update_compressed_packages
    multi_importer.loaders.append(ZipLoader(p))
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 609, in init
    self.scanzip()
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 728, in scanzip
    print(f, "in", zippath, "is not utf-8 encoded, unable to load plugin")
NameError: global name 'zippath' is not defined

Thanks
Neeraj Singh

0 Likes