condemil / gist

Sublime Text plugin for creating new Gists from selected text
MIT License
726 stars 137 forks source link

Gist: Error while contacting GitHub #153

Closed faiwer closed 7 years ago

faiwer commented 9 years ago
Traceback (most recent call last):
  File "request in /home/faiwer/.config/sublime-text-3/Installed Packages/Gist.sublime-package", line 135, in api_request
  File "request in /home/faiwer/.config/sublime-text-3/Installed Packages/Gist.sublime-package", line 65, in api_request_native
  File "./urllib/request.py", line 156, in urlopen
  File "./urllib/request.py", line 469, in open
  File "./urllib/request.py", line 492, in _open
  File "./urllib/request.py", line 447, in _call_chain
  File "./urllib/request.py", line 1310, in unknown_open
urllib.error.URLError: <urlopen error unknown url type: https>
error: Gist: Error while contacting GitHub
MartinThoma commented 9 years ago

I get this, too. I've just installed Ubuntu 14.10 (64 bit). Did you solve this meanwhile?

faiwer commented 9 years ago

MartinThoma, not :( LinuxMint user... python 2.7.3-0ubuntu7.1, python3 3.2.3-5ubuntu1.2

ukwiz commented 9 years ago

I have the same problem on Linux Mint 17

jmcbee commented 9 years ago

Me too >.<

jmcbee commented 9 years ago

I think you just need to replace urllib to urllib2.

jeremiahmarks commented 9 years ago

fbm-static - I would totally be down to make that change, but I am totally not for sure what you are suggesting I could replace. So that I can try and make the plugin work on my machine, can you elaborate a little more? I did
grep "urllib" ./* in ~/.config/sublime-text-2/Packages/Gist and the only file that uses urllib in anyformat is requests.py .

jmcbee commented 9 years ago

@jeremiahmarks I meant these lines

jeremiahmarks commented 9 years ago

Got to work today and installed this on a work computer and it just worked. When I attempted to install it at home again, the same issue brought be back to this thread, so I decided to finally figure out what was up with this.

This is actually an issue with the embedded python that sublime text comes with on linux. There seem to be a couple of workarounds, either this solution which involves compiling a compatible python executable and replacing the one that comes bundled with sublime-text, or this git. It seems like you would be able to do something with the files, however I have no idea how you would utilize them. (where to put them, how to execute them with relation to sublime-text, etc.)

condemil commented 7 years ago

Fixed since sublime text version 3110

jeremiahmarks commented 7 years ago

YAY! I remember how frustrating this was.

While I am here - thanks for the useful plugin, @condemil