[quote=“kristallizer”]I am running Sublime Text 2 (Build 2144) on Lubuntu 11.10 and, since yesterday, I am getting the following error every time I try to start Sublime Text…
[quote]Unable to run package setup:
Traceback (most recent call last):
File “./PackageSetup.py”, line 155, in upgrade
upgradePackage(pkg, pristinedir, datadir, backupdir)
File “./PackageSetup.py”, line 148, in upgradePackage
os.path.join(backupdir, base), inhibitOverwrite)
File “./PackageSetup.py”, line 31, in upgradeArchive
newar = zipfile.ZipFile(src)
File “.\zipfile.py”, line 696, in init
File “.\zipfile.py”, line 716, in _GetContents
File “.\zipfile.py”, line 728, in _RealGetContents
zipfile.BadZipfile: File is not a zip file[/quote]
Is there any fix for this?[/quote]
I resolved this by doing the following:
- You can follow this guide to revert to a fresh install of your profile: sublimetext.com/docs/2/revert.html.
- Install package control in the console by pressing CTRL+` and then paste the following into the console:
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
- Re-install all the packages that you had installed
- Copy all the files from Packages/User to your new profile directory Packages/User
- Copy all the files from Settings/ to your new profile directory Settings/
- Restart Sublime Text 2 everything should be back to normal again!