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

NameError: global name 'settings' is not defined #141

Closed
mandx opened this issue Feb 3, 2014 · 5 comments
Closed

NameError: global name 'settings' is not defined #141

mandx opened this issue Feb 3, 2014 · 5 comments

Comments

@mandx
Copy link

mandx commented Feb 3, 2014

I'm getting the error NameError: global name 'settings' is not defined in ST3's console, and the exception is thrown at ~/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package", line 73, in settings_loaded which I think is this line: git_gutter_events.py:L73. The plugin works, anyway.

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 255, in on_post_save
    callback.on_post_save(v)
  File "git_gutter_events in ~/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package", line 29, in on_post_save
  File "git_gutter_events in ~/Library/Application Support/Sublime Text 3/Installed Packages/GitGutter.sublime-package", line 73, in settings_loaded
NameError: global name 'settings' is not defined

I'm using OSX 10.9 and ST3 build 3059.

@jisaacks
Copy link
Owner

jisaacks commented Feb 3, 2014

Thanks, does this happen if you restart sublime? I have been noticing some weird things with sublime packages, after updating them, some attributes seem lost. A restart usually fixes it though. Just want to rule that out.

@mandx
Copy link
Author

mandx commented Feb 3, 2014

@jisaacks Yes you are right, the "problem" goes away if I simply quit and open Sublime again. Then I tried to reproduce the issue, but never happened again. Looking at the code, could be that plugin_loaded() is not always called, and therefore the settings global variable may not be set?

@jisaacks
Copy link
Owner

jisaacks commented Feb 3, 2014

it is supposed to be called, but if it isn't getting called that would be a sublime bug. Another possibility is that it gets called, just too late, again in theory that shouldn't happen.

If the bug was reproducible we could figure out exactly what is happening.

@poswald
Copy link

poswald commented Sep 22, 2014

FYI, I see this happen reproducibly in the ST3 console on startup if I pip install pylint into my system path (/usr/local/bin/pylint), and it goes away if I pip uninstall it.

@rchl
Copy link
Collaborator

rchl commented Nov 16, 2016

Unlikely to still be a problem after 3 years and many changed. Closing.

@rchl rchl closed this as completed Nov 16, 2016
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

4 participants