ggordan / GutterColor

A Sublime Text 3 plugin which displays a colour in the gutter if the line contains a colour.
MIT License
486 stars 44 forks source link

Getting Python Error -- TypeError: argument of type 'NoneType' is not iterable #118

Open yaitorr opened 6 years ago

yaitorr commented 6 years ago

Hi there, I recently installed the GutterColor ST3 plugin and I'm getting the following exception in the console, every time the plugin tries to run:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 530, in on_activated_async
    callback.on_activated_async(v)
  File "/Users/yaisiel.torres/Library/Application Support/Sublime Text 3/Packages/Gutter Color/gutter_color.py", line 40, in on_activated_async
    if syntax(view) in settings().get('supported_syntax'):
TypeError: argument of type 'NoneType' is not iterable

I already validated that I have the right ImageMagick install and ran all the ImageMagic-related troubleshooting in this repo's README. Am I still missing something from the install? Please let me know if you need additional details!

ocket8888 commented 4 years ago

Looks like the issue is the default value of the supported_syntax key not getting set properly. If you open the command palette (Ctrl+P on good operating systems, Cmd+P on Macs) and add:

{
    "supported_syntax": [
        "css",
        "scss",
        "sass",
        "less",
        "stylus",
        "css3",
        "xml"
    ]
}

(which mimicks the defaults) that error message goes away. Of course, now I'm seeing a different error....

mazunki commented 4 years ago

I had this problem too. It worked after removing the package and reinstalling it.