AndreasBackx / StyleSorter

CSS and SCSS attribute type sorter for Sublime Text 3. THIS PROJECT HAS BEEN ABANDONED.
8 stars 3 forks source link

TypeError: sequence item 1: expected str instance, list found #6

Closed ostrolucky closed 9 years ago

ostrolucky commented 9 years ago

If you run stylesorter command on this snippet, ti crashes

#test {
    /*text-shadow: 1px 1px 1px #000, 8px 5px 10px #000;*/
    /*text-shadow: 3px -3px 1px #000;*/
    /*background-color: #666666;*/
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
}

Output of console:

>>> view.run_command('style_sorter_sort')
Traceback (most recent call last):
  File "Parser in /home/gadelat/.config/sublime-text-3/Installed Packages/StyleSorter.sublime-package", line 25, in run
  File "Parser in /home/gadelat/.config/sublime-text-3/Installed Packages/StyleSorter.sublime-package", line 232, in format
  File "Parser in /home/gadelat/.config/sublime-text-3/Installed Packages/StyleSorter.sublime-package", line 226, in format
TypeError: sequence item 1: expected str instance, list found
AndreasBackx commented 9 years ago

Thank you for reporting the issue, a fix is on its way.

AndreasBackx commented 9 years ago

Version 1.0.5 fixed this issue and a first line comment issue. More information on the release page.

ostrolucky commented 9 years ago

Hey man, thanks for your work, but I believe it wasn't fixed fully, try it for this snippet:

#test {
    color: #9C2113;
    /*text-shadow: 1px 1px 1px #000, 8px 5px 10px #000;*/
    /*text-shadow: 3px -3px 1px #000;*/
    /*background-color: #666666;*/
    -webkit-background-clip: text;
}
AndreasBackx commented 9 years ago

That snippet is sorted as the following which is correct:

#test {
    color: #9C2113;

    /*text-shadow: 1px 1px 1px #000, 8px 5px 10px #000;*/
    /*text-shadow: 3px -3px 1px #000;*/
    /*background-color: #666666;*/
    -webkit-background-clip: text;
}

Make sure you have updated your version to 1.0.5.

ostrolucky commented 9 years ago

Hmm so after further investigation, it works when I manually install it by cloning gihub repo, but doesn't when installed through package control. Tried uninstall & install multiple times. So maybe it's local cache stuff problem.

AndreasBackx commented 9 years ago

After having asked for someone to test this out on the Freenode IRC channel ##sublimetext, he said it was giving the right output. There must be something wrong on your end then. Thank you for reporting this though.