Sublime Forum

Package Control: A full-featured package manager

#45

I tried to install using the command line and it does nothing. It creates an empty folder (on st start) and that’s all.
I tried to download & install this file: http://sublime.wbond.net/Package%20Control.sublime-package but when i hit *install package *i get this error in the console:

Exception in thread Thread-47:
Traceback (most recent call last):
  File ".\threading.py", line 532, in __bootstrap_inner
  File ".\Package Control.py", line 1189, in run
  File ".\Package Control.py", line 1099, in make_package_list
  File ".\Package Control.py", line 518, in incoming
  File ".\Package Control.py", line 457, in execute
  File ".\subprocess.py", line 633, in __init__
  File ".\subprocess.py", line 842, in _execute_child
WindowsError: [Error 5] Access is denied
0 Likes

#46

[quote=“iamntz”]I tried to install using the command line and it does nothing. It creates an empty folder (on st start) and that’s all.
I tried to download & install this file: http://sublime.wbond.net/Package%20Control.sublime-package but when i hit *install package *i get this error in the console:[/quote]

I’m looking into this right now.

0 Likes

#47

[quote=“iamntz”]I tried to download & install this file: http://sublime.wbond.net/Package%20Control.sublime-package but when i hit *install package *i get this error in the console:

Exception in thread Thread-47: Traceback (most recent call last): File ".\threading.py", line 532, in __bootstrap_inner File ".\Package Control.py", line 1189, in run File ".\Package Control.py", line 1099, in make_package_list File ".\Package Control.py", line 518, in incoming File ".\Package Control.py", line 457, in execute File ".\subprocess.py", line 633, in __init__ File ".\subprocess.py", line 842, in _execute_child WindowsError: [Error 5] Access is denied [/quote]

I’m not quite sure why the command line installed would not work. I just took a fresh ST2 environment on Win 7 x64 and it seemed to work fine extracting the files into the Package Control folder. If you want to try and debug it you could delete the Package Control folder and run the console command again. The next time you open ST2 you can look at the console and it should mention that it is installed Package Control. My guess is that there will probably be some error after it begins the process.

From the error message you posted after manually downloading the package, it seems like a file permissions issue with running Git to perform a Git fetch. My guess is that your current user for some reason does not have permission to execute git.exe, which is probably stored in C:\Program Files (x86)\Git\bin. If you right click and select Properties and then go to the Security tab, there will be a list of users and groups that have permissions. On my machine the Users group has the read and execute permission. For git fetch to get executed, one of your packages must be a git repository. Perhaps the permissions on some files in that repository are broken also?

Let me know what you find out!

0 Likes

#48

If anyone gets the following error:

Package Control: An error occurred while trying to backup the package directory for [package name].

Please execute the following in your console:

import os;os.makedirs(os.path.join(os.path.dirname(sublime.packages_path()), 'Backup'))
0 Likes

#49

Permissions looks like this: screencast.com/t/rb7GnnxJ4t

On startup console i have this (that is related to package control):

startup, version: 2102 windows x64 channel: dev executable: /C/Program Files/Sublime Text 2/sublime_text.exe working dir: /C/Windows/system32 packages path: /C/Users/Ionut/AppData/Roaming/Sublime Text 2/Packages settings path: /C/Users/Ionut/AppData/Roaming/Sublime Text 2/Settings error parsing session: No data at: 0:0 package /C/Users/Ionut/AppData/Roaming/Sublime Text 2/Installed Packages/Package Control.sublime-package is newer than the installed version (/C/Users/Ionut/AppData/Roaming/Sublime Text 2/Pristine Packages/Package Control.sublime-package), running PackageSetup PackageSetup returned: -1 catalogue loaded

Git is installed into c:\cygwin\git and is accesible via windows cmd.

Also, this command:

import os;os.makedirs(os.path.join(os.path.dirname(sublime.packages_path()), 'Backup'))

give me this:

[code]

import os;os.makedirs(os.path.join(os.path.dirname(sublime.packages_path()), ‘Backup’))
Traceback (most recent call last):
File “”, line 1, in
File “.\os.py”, line 157, in makedirs
WindowsError: [Error 183] Cannot create a file when that file already exists: u’C:\Users\Ionut\AppData\Roaming\Sublime Text 2\Backup’[/code]

0 Likes

#50

Yeah, sorry, that Backup command was unrelated to your issues, but a bug someone else found.

Did you manually set the git_binary setting in the Package Control settings? Can you try browsing to the package folder that is a git repository and executing “git fetch”?

0 Likes

#51

The Package Control folder is empty. I re-downloaded the sublime-package file mentioned above but no luck. I tried to clone the github repo but that didnt worked either.

For git config i have this:

"git_binary": "C:\\cygwin\\git\\bin"

(also tried to specify git.exe and / instead of \). Same error.

0 Likes

#52

[quote=“iamntz”]For git config i have this:

"git_binary": "C:\\cygwin\\git\\bin"

Aha! So the git_binary setting should include the executable name. I’ll make the documentation more clear on this. Here is a config that should work:

"git_binary": "C:\\cygwin\\git\\bin\\git.exe"
0 Likes

#53

Yeah, that didnt worked either. I tried before.
Still got this:

Exception in thread Thread-2: Traceback (most recent call last): File ".\threading.py", line 532, in __bootstrap_inner File ".\Package Control.py", line 1522, in run File ".\Package Control.py", line 1099, in make_package_list File ".\Package Control.py", line 518, in incoming File ".\Package Control.py", line 457, in execute File ".\subprocess.py", line 633, in __init__ File ".\subprocess.py", line 842, in _execute_child WindowsError: [Error 5] Access is denied

However, the main difference is that now i restarted the editor and when i tried to „install packages” i got like 10 errors like:

Package Control: Downloading http://sublime.wbond.net/packages.json timed out, trying again 

(different urls tho)

0 Likes

#54

[quote=“iamntz”]Yeah, that didnt worked either. I tried before.
Still got this:

Exception in thread Thread-2: Traceback (most recent call last): File ".\threading.py", line 532, in __bootstrap_inner File ".\Package Control.py", line 1522, in run File ".\Package Control.py", line 1099, in make_package_list File ".\Package Control.py", line 518, in incoming File ".\Package Control.py", line 457, in execute File ".\subprocess.py", line 633, in __init__ File ".\subprocess.py", line 842, in _execute_child WindowsError: [Error 5] Access is denied[/quote]

There definitely seems to be a permissions issue on your machine somewhere. Did you try running “git fetch” on the package you have that is a git repository? I just installed cygwin and set my git_binary setting and everything worked fine. The only difference I see is that mine installed to C:\cygwin\bin\git.exe instead of C:\cygwin\git\bin\git.exe.

[quote=“iamntz”]However, the main difference is that now i restarted the editor and when i tried to „install packages” i got like 10 errors like:

Package Control: Downloading http://sublime.wbond.net/packages.json timed out, trying again 

(different urls tho)[/quote]

This is ok, just a diagnostic message. If you get a real error a message will pop up. By default the timeout is set to 3 seconds, which sometimes is too short depending on how heavily loaded the server is. If you do consistently get an error popup, you can increase the timeout in the Preferences > Package Settings > Package Control > Settings - User file.

0 Likes

#55

Grrr. Everything else works just fine. There are few “WindowsError: [Error 5] Access is denied” related results on google (and stackoverflow) that suggest the issue is python.

Anyhow, don’t worry, i don’t really need the PM, i was more like curious. :open_mouth:

0 Likes

#56

I apologize if I sounded patronizing. If you would oblige me a minute longer, could you edit the execute() method of the VcsUpgrader class on line 449 of Package Control.py to be the following?

    def execute(self, args, dir):
        startupinfo = None
        if os.name == 'nt':
            startupinfo = subprocess.STARTUPINFO()
            startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
        print args
        print dir
        proc = subprocess.Popen(args, stdin=subprocess.PIPE,
            stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
            startupinfo=startupinfo, cwd=dir)

        return proc.stdout.read().replace('\r\n', '\n').rstrip(' \n\r')

When you save the file, it should automatically try to execute the upgrader, and it should print what it is trying to execute and the directory it is trying to execute in.

0 Likes

#57

Yeah, i think i found the problem. Somehow.
I deleted the user folder and now seems to work. Let’s see which one is bitchin!

0 Likes

#58

Ok, me dumb. I had a Package Control.sublime-settings file into user directory with wrong stuff in it. The thing is the file was automatically added (and i just edit the file within package control directory).
Now seems to work.

Thanks for help!

0 Likes

#59

[quote=“iamntz”]Ok, me dumb. I had a Package Control.sublime-settings file into user directory with wrong stuff in it. The thing is the file was automatically added (and i just edit the file within package control directory).
Now seems to work.

Thanks for help![/quote]

No worries, I’m glad you figured it out! Just so you know, you should edit the settings file in the User directory because the one in the Package Control directory gets overwritten whenever Package Control updates itself. The Preferences > Package Settings > Package Control > Settings – User menu entry opens the one in your User directory because of this. This is also the case for all of the other " – Default" and " – User" menu entries in the Preferences menu. All of the Default ones will be overwritten when you next upgrade Sublime Text.

0 Likes

#60

I know, i know. I started to edit the main settings file as a desperate measure, when i saw that the plugin didn’t worked.
Oh well… :smiley:

0 Likes

#61

I’ve tried installing Package Control (to grab this plugin) a couple of times now.

Following install directions, here is the error I receive at restart of ST2-2102 on my Win7x64 platform:
http://i.imgur.com/cJ652.jpg.

But the Package Control.sublime-settings file is not in the User folder.

For indexing :smile:

Package Control: Unable to find git.exe. Please set the git_binary setting in st2\Data\Packages\User\Package Control.sublime-settings.
0 Likes

#62

[quote=“atomi”]I’ve tried installing Package Control (to grab this plugin) a couple of times now.

Following install directions, here is the error I receive at restart of ST2-2102 on my Win7x64 platform:
http://i.imgur.com/cJ652.jpg.

But the Package Control.sublime-settings file is not in the User folder.[/quote]

I should improve the error messaging there to point to the preferences menu. If you go to the Preferences > Package Settings > Package Control > Settings – User menu entry, it will open that file in the User directory that you can then edit and save.

0 Likes

#63

Package Control 1.1.2 is out with improved handling of custom git and hg paths, better git_binary and hg_binary error messaging and C:\cygwin\bin is now also searched when running on Windows.

0 Likes

#64

If Package Control is no longer working after restarting Sublime Text or upgrading to build 2103, it is due to a bug on my part with the upgrade procedure. Package Control simply needs to be reinstalled by following the install instructions. Version 1.1.3 has fixed the bug, so you should not need to repeat this process again.

0 Likes