csscomb / sublime-csscomb

Sublime plugin for CSScomb—CSS coding style formatter
398 stars 61 forks source link

AttributeError: 'NoneType' object has no attribute 'rfind' #54

Closed joaocunha closed 9 years ago

joaocunha commented 9 years ago

Yosemite 10.10.2 nvm 0.23.3 node v0.10.36 Sublime Text 3 (stable 3065)

I'm getting this error. Couldn't find anything on the issues.

Traceback (most recent call last): File "/opt/homebrew-cask/Caskroom/sublime-text3/Build 3065/Sublime Text.app/Contents/MacOS/sublimeplugin.py", line 549, in run return self.run(edit) File "/Users/joaocunha/Library/Application Support/Sublime Text 3/Packages/CSScomb/CSScomb.py", line 27, in run combed = self.comb(originalBuffer, syntax, config) File "/Users/joaocunha/Library/Application Support/Sublime Text 3/Packages/CSScomb/CSScomb.py", line 41, in comb folder = os.path.dirname(self.view.file_name()) File "./posixpath.py", line 151, in dirname AttributeError: 'NoneType' object has no attribute 'rfind'

joaocunha commented 9 years ago

Found the problem.

I was trying to comb an untitled, unsaved file (copy pasted my stuff to a new file so I could test). It tries to read the file path, and it's null.