sublimetext-codeformatter icon indicating copy to clipboard operation
sublimetext-codeformatter copied to clipboard

Getting `TypeError: argument of type 'NoneType' is not iterable`

Open ilearnio opened this issue 9 years ago • 5 comments
trafficstars

Just installed this plugin and got this when tried to format .js file:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 618, in run_
    return self.run(edit)
  File "/Users/Admin/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/CodeFormatter.py", line 79, in run
    formatter = Formatter(self.view, file_name, syntax, saving)
  File "/Users/Admin/Library/Application Support/Sublime Text 3/Packages/CodeFormatter/codeformatter/formatter.py", line 59, in __init__
    if ("syntaxes" in opts and opts["syntaxes"]):
TypeError: argument of type 'NoneType' is not iterable

OS X, Sublime Text 3117

ilearnio avatar Jun 27 '16 15:06 ilearnio

The same in Manjaro Linux

miculprogramator avatar Jun 29 '16 17:06 miculprogramator

It seems lack of user setting file. Try to touch or create the User Setting for CodeFormatter.

Preferences > Package Settings > CodeFormatter > Settings - User

It might help.

tuha305 avatar Jul 08 '16 12:07 tuha305

as @tuha305 mentioned, create User Settings, cut and paste the default config over fixed the problem for me

kenvunz avatar Jul 13 '16 02:07 kenvunz

Copying codeformatter_js_options from default to user settings didn't fix this issue for me.

gambolputty avatar Oct 13 '17 03:10 gambolputty

As mentioned in #208, restarting Sublime Text solved this issue for me.

gambolputty avatar Oct 13 '17 03:10 gambolputty