noahcoad / google-spell-check

Uses Google Search spelling magic to fix words or phrases for Sublime Text.
121 stars 18 forks source link

'str' object has no attribute 'parser' #13

Open mrjoshuak opened 10 years ago

mrjoshuak commented 10 years ago

At some point in the last couple of months this stopped working for me. Not sure it's a conflicting new packing or a change in the plugin, but it did work before. Now when I run the command I get the expected pause, but the word is not corrected and I get this traceback in the console.

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "google-spell-check in /Users/joshua/Library/Application Support/Sublime Text 3/Installed Packages/Google Spell Check.sublime-package", line 16, in run
  File "google-spell-check in /Users/joshua/Library/Application Support/Sublime Text 3/Installed Packages/Google Spell Check.sublime-package", line 23, in correct
AttributeError: 'str' object has no attribute 'parser'
sergiitk commented 10 years ago

I experience same error using my ST3. Here's the backtrace:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "google-spell-check in /Users/sergii/Library/Application Support/Sublime Text 3/Installed Packages/Google Spell Check.sublime-package", line 16, in run
  File "google-spell-check in /Users/sergii/Library/Application Support/Sublime Text 3/Installed Packages/Google Spell Check.sublime-package", line 23, in correct
AttributeError: 'str' object has no attribute 'parser'
MaokaiLin commented 10 years ago

It seems the author is not maintaining this repo. If you'd like, you can open the source python file and change the "html" variable in Line 22 and 29 into something else, such as "html_result".

The error is due to the use of "html" as a variable name in that function. Because the python module "html" is also used, python is confused by the naming conflict.