JetBrains / colorSchemeTool

Apache License 2.0
452 stars 81 forks source link

AttributeError: 'list' object has no attribute 'split' #25

Closed trungklam closed 4 years ago

trungklam commented 5 years ago

Hi, I just got an error when trying to convert a theme of vscode to Intellij. Any idea will be very appreciated :) I'm using Python 2.7.16 I attached the theme also.

$ ./convert.sh
converting ./vscThemes/OneMonokai-color-theme.json to ./tmThemes/OneMonokai-color-theme.tmTheme ...
converting ./tmThemes/OneMonokai-color-theme.tmTheme to ./intellijThemes/OneMonokai-color-theme.icls ...
Traceback (most recent call last):
  File "colorSchemeTool.py", line 873, in <module>
    all_settings, used_scopes = load_textmate_scheme(sys.argv[1])
  File "colorSchemeTool.py", line 753, in load_textmate_scheme
    default_settings = find_by_scope(all_settings, None)
  File "colorSchemeTool.py", line 695, in find_by_scope
    scopes_of_setting = scope_of_setting.split(",")
AttributeError: 'list' object has no attribute 'split'

OneMonokai.zip

trungklam commented 5 years ago

JB IDE had been left behind quite far in visualize aspect (such as theme, font render issue...etc) compare to other IDE and recently just added support for people can create theme. I was happy when found this repo, which can keep us not feeling so jealous with other rich themes IDE like vscode but It seems It had been abandoned so far

rafatrace commented 4 years ago

I also got this error, did you made any progress on this or solved it in any way?

solancer commented 4 years ago

same issue when I tried converting Noctis theme

Screenshot 2019-11-26 at 6 18 35 pm
trungklam commented 4 years ago

My first though about this problem is related to Python version, but I checked and the same thing happened even with the recommend python version 2.7. No idea so far.

timohermans commented 4 years ago

I made a fix for this, but I don't know how to create a pull request

trungklam commented 4 years ago

I made a fix for this, but I don't know how to create a pull request

You need to commit the fix to your branch (which forked from this one) then create pull request from here: https://github.com/JetBrains/colorSchemeTool/pulls The base branch should be master branch of this repo and compare branch should be your forked. Hope this help.

timohermans commented 4 years ago

Just did :D. Here you go

https://github.com/JetBrains/colorSchemeTool/pull/28

denofevil commented 4 years ago

I think it can be closed, thanks a lot to @timohermans for the fix!

timohermans commented 4 years ago

No problem @denofevil. Was fun diving into :)