Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Package does not bring up a list of packages. #104

Closed
StephenWatts opened this issue Mar 13, 2012 · 22 comments
Closed

Install Package does not bring up a list of packages. #104

StephenWatts opened this issue Mar 13, 2012 · 22 comments

Comments

@StephenWatts
Copy link

Hello,

No list of packages comes up for me when I chose the install package option. Says fetching packages (or something similar, not at my computer) down the bottom left but then nothing happens.

This is from the console:

Exception in thread Thread-6:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in bootstrap_inner
self.run()
File "./Package Control.py", line 1890, in run
File "./Package Control.py", line 1759, in make_package_list
File "./Package Control.py", line 1121, in list_available_packages
File "./Package Control.py", line 1066, in list_repositories
File "./Package Control.py", line 175, in get_repositories
File "./Package Control.py", line 148, in fetch_channel
File "./Package Control.py", line 1007, in download_url
File "./Package Control.py", line 602, in download
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 124, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 375, in open
protocol = req.get_type()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 241, in get_type
raise ValueError, "unknown url type: %s" % self.original
ValueError: unknown url type:

Tried reinstalling as it has not been working for a couple of days so didn't think it would be a server issue?
Any assistance would be greatly appreciated.

Thanks for all your great work!

@christinechaochao
Copy link

I'm also experiencing the same thing. Tried clean install and everything. I get this error when I start sublime text 2, I'm on windows 7 x64

Package Control: Error submitting usage information. URL error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond downloading https://sublime.wbond.net/submit?package_control_version=1.5.0&sublime_platform=windows&package=Package+Control&sublime_version=2181&version=1.5.0&operation=install.
Package Control: Skipping automatic upgrade, last run at 2012-03-13 10:48:32, next run at 2012-03-13 11:48:32 or after

and this is the error I get when I tried to install packages
Package Control: Error downloading channel. URL error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond downloading https://sublime.wbond.net/repositories.json.
Package Control: No CA certs available for api.bitbucket.org.
Exception in thread Thread-4:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File ".\Package Control.py", line 776, in run
File ".\Package Control.py", line 253, in get_packages
TypeError: string indices must be integers

Exception in thread Thread-3:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File ".\Package Control.py", line 1890, in run
File ".\Package Control.py", line 1759, in make_package_list
File ".\Package Control.py", line 1182, in list_available_packages
AttributeError: 'RepositoryDownloader' object has no attribute 'renamed_packages'

Thanks!

@christinechaochao
Copy link

btw I tried what you said in a different thread by adding http://sublime.wbond.net/repositories.json to package control> settings - user, but I guess it's still not working...

@wbond
Copy link
Owner

wbond commented Mar 13, 2012

@wattsy @christinelalala

Can you both paste your Package Control > Settings - User files so I can make sure there aren't any errors?

@christinechaochao
Copy link

here's mine

{
"auto_upgrade_last_run": 1331660912,
"repositories":
[
"https://bitbucket.org/sublimator/sublime-2-zencoding",
"http://sublime.wbond.net/repositories.json"
]
}

@wbond
Copy link
Owner

wbond commented Mar 13, 2012

It should look like this:

{
    "auto_upgrade_last_run": 1331660912,
    "repositories": [
        "https://bitbucket.org/sublimator/sublime-2-zencoding"
    ],
    "repository_channels": [
        "http://sublime.wbond.net/repositories.json"
    ]
}

@christinechaochao
Copy link

ooooo I see! it works now! Thank you!

but then I'm still getting this error for installing zencoding

Package Control: Error downloading package. URL error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond downloading https://bitbucket.org/sublimator/sublime-2-zencoding/get/8be235edaf1c.zip.

so this will be their problem right?

@wbond
Copy link
Owner

wbond commented Mar 13, 2012

@christinelalala Perhaps... can you install packages off of GitHub? (most packages are from there) If you can, then I would guess it is another incompatibility. If not, I think there is still a larger SSL issue we have not identified yet.

@christinechaochao
Copy link

I tried installing two packages from github, still getting errors:

Package Control: Error downloading package. URL error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond downloading https://nodeload.github.com/SublimeText/jQuery/zipball/master.
Package Control: Error downloading package. URL error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond downloading https://nodeload.github.com/aaronpowell/sublime-jquery-snippets/zipball/master.

@wbond
Copy link
Owner

wbond commented Mar 14, 2012

@christinelalala That says to me that the issue is not with my server, but with SSL connections in general. Does your network have a proxy?

@StephenWatts
Copy link
Author

Looks like it was the User settings file being wrong, apologies for taking up your time!

Thanks again for your great work!

@wbond
Copy link
Owner

wbond commented Mar 14, 2012

@wattsy I'm just curious (for the sake of helping people in the future, or adding some error checking code) what did your settings look like?

@christinechaochao
Copy link

Hey Will, yeah it's definitely my network's proxy, I tried to install at home and everything worked fine. So it's the network at work blocking me, can't turn the proxy off though. Thanks again!

@kibe88
Copy link

kibe88 commented Mar 21, 2012

@wbond just overwrote my user settings with the one you suplied here and it's all working now (had the same problem as the original poster). BTW, my settings was exactly the same as @christinelalala

{
"auto_upgrade_last_run": 1331660912,
"repositories": [
"https://bitbucket.org/sublimator/sublime-2-zencoding"
],
"repository_channels": [
"http://sublime.wbond.net/repositories.json"
]
}

Thanks in advance. Just for the record I did nothing to my user settings since I installed package control so I really don't know what could have happened.

Thanks anyway (:

@wbond
Copy link
Owner

wbond commented Mar 21, 2012

@renators So what this indicates it that for some reason your machine does not want to connect to the channel file over SSL. The difference between that config and the default is that the channel file is served at https://sublime.wbond.net/repositories.json for the default.

By changing this, I need to make you aware that you are now technically vulnerable to man-in-the-middle attacks that could load arbitrary Python code onto your machine, and perform any tasks permitted for the user you run Sublime as. This could including deleting files and folders on your machine, or downloading other malicious software.

Also, what platform are you using?

@wbond
Copy link
Owner

wbond commented Mar 29, 2012

sublime.wbond.net has moved to a new server, can everyone check and see if they get any different results now?

@Sh4d0Wx
Copy link

Sh4d0Wx commented Apr 21, 2012

With "repository_channels" set to "https://sublime.wbond.net/repositories.json" it doesnt fetch any packages, when changed to http:// it works. But there is another problem, now it lists the packages but when i install them, it says they have been successfully installed but i get another error in the console and they are not actually installed and not listed in the "Package control: List packages" option.

This is the error from the console:

Exception in thread Thread-8:
Traceback (most recent call last):
File ".\threading.py", line 532, in bootstrap_inner
File ".\Package Control.py", line 1871, in run
File ".\Package Control.py", line 1339, in install_package
File ".\Package Control.py", line 1007, in download_url
File ".\Package Control.py", line 602, in download
File ".\urllib2.py", line 126, in urlopen
File ".\urllib2.py", line 391, in open
File ".\urllib2.py", line 409, in _open
File ".\urllib2.py", line 369, in _call_chain
File ".\Package Control.py", line 92, in https_open
File ".\urllib2.py", line 1133, in do_open
File ".\httplib.py", line 910, in request
File ".\httplib.py", line 947, in _send_request
File ".\httplib.py", line 904, in endheaders
File ".\httplib.py", line 776, in _send_output
File ".\httplib.py", line 735, in send
File ".\Package Control.py", line 71, in connect
File ".\ssl.py", line 350, in wrap_socket
File ".\ssl.py", line 113, in __init

UnicodeEncodeError: 'ascii' codec can't encode character u'\u0161' in position 36: ordinal not in range(128)

@schlamar
Copy link
Contributor

If you are behind a proxy, try #116 as fix.

@Sh4d0Wx
Copy link

Sh4d0Wx commented May 24, 2012

I already fixed it, the problem was that path to my C:....\sublime text\packages had non-ascii characters in the user name (like C:\Users\čšžýúá etc.). So the quick fix for this is just to download the portable version and extract it somewhere else (I did E:\Sublime text) That way all the packages and stuff were loaded from that folder and not from application data folder, which caused the error.

@schlamar
Copy link
Contributor

The cause is described in #117

@wbond
Copy link
Owner

wbond commented May 24, 2012

Thanks for all of your work on trying to get these issues resolved. I will hopefully have time to really address these in the next week or so.

That said, it is not a bug that packages_path() returns a unicode string. It should. The bug is that I am combining it with an ascii string, causing an encoding issue.

Basically I didn't know enough about unicode handling in python when I wrote Package Control, and I got some stuff wrong.

@schlamar
Copy link
Contributor

No, combining an Unicode string with a byte string is no problem:

>>> os.path.join(u'äöü', 'aou')
u'\xe4\xf6\xfc\\aou'

The problem is that the ssl module cannot deal with Unicode filenames. I have submitted this to the Python bugtracker: http://bugs.python.org/issue14907

But for now, we should go with the fix in #117.

@wbond
Copy link
Owner

wbond commented Jun 11, 2012

I am going to be closing this issue since the original poster's issue is solved and we are in the territory of multiple different bug reports here. Anyone else that is still having issues, please try the instruction below.

There is a testing version of Package Control available which should hopefully resolve this issue thanks to @ms4py. To test it, please:

  1. In Sublime Text, click the Preferences > Browse Packages… menu entry
  2. Browse up a folder and then into the Installed Packages folder
  3. Download http://sublime.wbond.net/testing/Package%20Control.sublime-package and copy it into the Installed Packages directory
  4. Restart Sublime Text

If you are still having issues, please post to another issue with the exact same symptoms you are having, or create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants