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

Error: "Gist: unknown error (please, report a bug!)" #151

Closed
wa-rren-dev opened this issue Oct 8, 2014 · 38 comments
Closed

Error: "Gist: unknown error (please, report a bug!)" #151

wa-rren-dev opened this issue Oct 8, 2014 · 38 comments

Comments

@wa-rren-dev
Copy link

Post-install when trying to do anything with Gist! No settings popup.

@HorayNarea
Copy link

i second this, even after manual configuring
creating gists works but also shows this error

@EvanAgee
Copy link

Same here...
I noticed it happening after I installed OSX Yosemite, FYI

@jiqimaogou
Copy link

windows has the same problem.

@the-glima
Copy link

same here on Ubuntu 14.04

@zboldyga
Copy link

Same here with OS X Yosemite, the plugin doesn't ask for settings and pops up with the titled error message when I run any commands.

I added a user settings file and was able to create a gist, although an error box still popped up. All other commands still failed with an error box.

@zboldyga
Copy link

oh, and I'm using sublime text 3 beta

@ostueker
Copy link

Same error here.

error: Gist: Error while contacting GitHubNo such file or directory
error: Gist: unknown error (please, report a bug!)
  • Sublime Text 2 (Version 2.0.2, Build 221)
  • Gist version: 2014.08.23.17.39.42
  • OS: Ubuntu 14.04

Interestingly it works on a different machine with Ubuntu 12.04.

@lucasv1179
Copy link

Same problem.

Console output:
Traceback (most recent call last):
    File ".\gist.py", line 37, in _fn
    File ".\gist.py", line 327, in run
NameError: global name 'gists_filter' is not defined
error: Gist: unknown error (please, report a bug!)

@sheldonhull
Copy link

Similar error. Note, I can create a gist, but I can't OPEN. The open gist option is what is causing me to fail.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gist in C:\Users\g00p\AppData\Roaming\Sublime Text 3\Installed Packages\Gist.sublime-package", line 37, in _fn
  File "gist in C:\Users\g00p\AppData\Roaming\Sublime Text 3\Installed Packages\Gist.sublime-package", line 327, in run
  File "request in C:\Users\g00p\AppData\Roaming\Sublime Text 3\Installed Packages\Gist.sublime-package", line 135, in api_request
  File "request in C:\Users\g00p\AppData\Roaming\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 487, in _open
  File "./urllib/request.py", line 447, in _call_chain
  File "./urllib/request.py", line 1283, in https_open
  File "./urllib/request.py", line 1219, in do_open
  File "./http/client.py", line 1176, in __init__
  File "./http/client.py", line 753, in __init__
  File "./http/client.py", line 779, in _set_hostport
http.client.InvalidURL: nonnumeric port: 'port'
error: Gist: unknown error (please, report a bug!)

@jklepatch
Copy link

same error here:

Traceback (most recent call last):
File ".\gist.py", line 37, in _fn
File ".\gist.py", line 327, in run
File ".\request.py", line 135, in api_request
File ".\request.py", line 47, in api_request_native
File ".\request.py", line 37, in token_auth_string
MissingCredentialsException

@jackkeller
Copy link

Same here sadly, Yosemite & ST3 also. Anybody find a workaround for this yet?

@nonchip
Copy link

nonchip commented Nov 11, 2014

same here.

Traceback (most recent call last):
  File "gist in /home/kyra/.config/sublime-text-3/Installed Packages/Gist.sublime-package", line 37, in _fn
  File "gist in /home/kyra/.config/sublime-text-3/Installed Packages/Gist.sublime-package", line 327, in run
  File "helpers in /home/kyra/.config/sublime-text-3/Installed Packages/Gist.sublime-package", line 68, in gists_filter
  File "helpers in /home/kyra/.config/sublime-text-3/Installed Packages/Gist.sublime-package", line 49, in gist_title
AttributeError: 'NoneType' object has no attribute 'get'
error: Gist: unknown error (please, report a bug!)

seems as if the api_request in gist.py line 327:

        filtered = gists_filter(api_request(settings.GISTS_URL))

returns some empty values, which are then propagated through helpers.py gists_filter into gist_title, where it tries to call .get in line 49:

        return [title, gist.get('user').get('login')]

@MartinSerdar
Copy link

Not working here too... ST3 Win64

@mhanel
Copy link

mhanel commented Nov 19, 2014

I had the same problem with ST3 on OS X Yosemite. Changed the value for "show_authors" to "false" and it works :).

"show_authors": false

@the-glima
Copy link

@mhanel that works, thanks!

@renestalder
Copy link

Can confirm, that @mhanel 's solution is working for me.

@emrecamasuvi
Copy link

I've resolved my problem by adding proper setup variables to Gist.sublime-settings - User
Go to, preferences -> Package settings -> Gist -> Settings -User

  1. Grab your token from github https://github.com/settings/applications#personal-access-tokens
  2. Add the token in user settings file.
{
   "token": "XXX"
}

If you're behind corporate proxy, u should also write it in settings file;

{
   "https_proxy": "http://USER:PASS@IP:PORT",
   "token": "XXX"
}

@schutzsmith
Copy link

Doesn't seem to work for me with most recent version of package and on ST3 Yosemite. Looks like I can create a gist no problem, but "Gist open" produces this error.

I'm getting in the console:

Traceback (most recent call last):
  File "gist in /Users/danielschutzsmith/Library/Application Support/Sublime Text 3/Installed Packages/Gist.sublime-package", line 37, in _fn
  File "gist in /Users/danielschutzsmith/Library/Application Support/Sublime Text 3/Installed Packages/Gist.sublime-package", line 327, in run
  File "/Users/danielschutzsmith/Library/Application Support/Sublime Text 3/Packages/Gist/helpers.py", line 68, in gists_filter
    name = gist_title(gist)
  File "/Users/danielschutzsmith/Library/Application Support/Sublime Text 3/Packages/Gist/helpers.py", line 49, in gist_title
    return [title, gist.get('user').get('login')]
AttributeError: 'NoneType' object has no attribute 'get'
error: Gist: unknown error (please, report a bug!)

@knjname
Copy link

knjname commented Jan 14, 2015

I faced this problem (Win8.1 x64 and Sublime 2.0.2),

Traceback (most recent call last):
  File ".\gist.py", line 37, in _fn
    return fn(*args, **kwargs)
  File ".\gist.py", line 209, in on_gist_filename
    gist = create_gist(self.public, description, gist_data)
  File ".\gist.py", line 60, in create_gist
    gist = api_request(settings.GISTS_URL, data)
  File ".\request.py", line 135, in api_request
    return api_request_curl(url, data, token, https_proxy, method)
  File ".\request.py", line 49, in api_request_native
    token = token if token != None else token_auth_string()
  File ".\request.py", line 39, in token_auth_string
    raise MissingCredentialsException()
MissingCredentialsException
error: Gist: unknown error (please, report a bug!)

and the following lines seem not to work.

at request.py line 32.

def token_auth_string():
    settings = sublime.load_settings('Gist.sublime-settings')
    token = settings.get('token')
    print settings.get('token') # -> "None"
    print settings.get('max_gists') # -> "None"

@lasselehtinen
Copy link

Same problem, but with Win7 x64 and Sublime Text 2.0.2. Token has been created and added to the config.

Traceback (most recent call last):
  File ".\gist.py", line 37, in _fn
  File ".\gist.py", line 209, in on_gist_filename
  File ".\gist.py", line 60, in create_gist
  File ".\request.py", line 135, in api_request
  File ".\request.py", line 47, in api_request_native
  File ".\request.py", line 37, in token_auth_string
MissingCredentialsException
error: Gist: unknown error (please, report a bug!)

@adiaz101
Copy link

For those also not being able to open a gist, change the "show_authors": to false. Running on windows 7

@ghost
Copy link

ghost commented Feb 24, 2015

+1 to everyone above who suggested changing "show_authors" to false. Worked for me on OSX 10.10

@leongaban
Copy link

http://stackoverflow.com/questions/28972615/gist-plugin-erroring-out-in-sublime-text-3?noredirect=1#comment46196521_28972615

The plugin still produces the same error for me. OSX Yosemite + Sublime Text 3.

I generated the token, and added it along with the "show_authors": false flag :(

Another strange thing, when I open up the default Gist settings and try to save it, I get the following error: "Unable to save ~/Library/Application Support/Sublime Text 3/Packages/Gist/Gist.sublime-settings Error: No such file or directory"

@leongaban
Copy link

Got it working!

Instead of generation a token via the CURL command: https://github.com/condemil/Gist#generating-access-token

I had to generation a token on Github here: https://github.com/settings/applications#personal-access-tokens

It produced a string which I pasted into the "token" key instead of the JSON produced by the CURL command.

@daynaskully
Copy link

Sublime 2.0.2, 2221 (osx 10.10.2)

MissingCredentialsException: Doesn't read Gist.sublime-settings to get the access token. If i edit request.py and manually return my token it works.

from pprint import pprint
pprint (vars(settings))

{}

@ianchanning
Copy link

Since the proper settings window doesn't open on package installation. When you add your token make sure you are editing

Preferences > Package Settings > Gist > Settings - User

and not just

Preferences > Settings - User

@spleenteo
Copy link

I don't know why and how but at the first line of my gist user preference file, there is a path to the file it self. I've just removed that line, and now it works like a charm.

@schutzsmith
Copy link

Took the advice of all above but still doesn't seem to work. Even made new token via Personal Access. Any other possible solutions?

@llanquin
Copy link

i took all the advices too but nothing seemed to work until i noticed my gist user preferences had some elements inside [ ] and they were not an array so i eliminated it and now is working.

the lines where:

"include_users": "[llanquin]" and "include_orgs": "[]", 

and i changed them to:

"include_users": "llanquin" and "include_orgs": "",

now the plugin is working for me.
hope this simple and stupid thing can help other people.

@drebbits
Copy link

This solved it for me. Just wondering why the Settings - Default isn't editable?

@kevin-snippet
Copy link

put in the token and it works :)

@phaberest
Copy link

I can confirm it still gives that error if I set "show_authors": true, solved with @mhanel hint.

@olpapchenko
Copy link

@emrecamasuvi solution is working

@versedi
Copy link

versedi commented Aug 29, 2015

@mhanel's solution is a way to go 👍

@robstarbuck
Copy link

@ianchanning +1. It was just a matter of knowing where to set the token.

@Unayung
Copy link

Unayung commented Nov 24, 2015

@mhanel kudo for that !! just turn show_authors to false and voila :)

@eteache
Copy link

eteache commented Nov 24, 2015

@emrecamasuvi 👍

vmuriart added a commit to vmuriart/Gist that referenced this issue Mar 28, 2016
User field seems to only be used on a commit by commit basis in history.
https://developer.github.com/v3/gists/#get-a-single-gist
This doesn't show all_authors but rather the current owner which seems to have been the initial intention of the code.
Should fix condemil#151 and re-enable feature to be used.
Closes condemil#145 as well.
@mvexel
Copy link

mvexel commented Dec 20, 2016

The solution @mhanel provided also works on Linux.

vmuriart added a commit to vmuriart/Gist that referenced this issue Mar 21, 2017
User field seems to only be used on a commit by commit basis in history.
https://developer.github.com/v3/gists/#get-a-single-gist
This doesn't show all_authors but rather the current owner which seems to have been the initial intention of the code.
Should fix condemil#151 and re-enable feature to be used.
Closes condemil#145 as well.
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