JulianEberius / SublimePythonIDE

ST3 only: A rewrite of SublimeRope for ST3, uses the Rope library to add python completions and refactoring to ST3
GNU General Public License v2.0
267 stars 38 forks source link

Startup Issue #98

Open ihdavids opened 3 years ago

ihdavids commented 3 years ago

I get the following when I start using the plugin:

Traceback (most recent call last): File "C:\Users\ihdav\AppData\Roaming\Sublime Text\Packages\SublimePythonIDE\sublime_python_colors.py", line 82, in generate_color_scheme_async plist = ElementTree.XML(scheme_text) File "./python3.3/xml/etree/ElementTree.py", line 1356, in XML xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0

ihdavids commented 3 years ago

It looks like you are expecting the color scheme to be one of the older textmate schemes?

The scheme I am loading is: Packages/Guna/themes/Guna.sublime-color-scheme

ihdavids commented 3 years ago

Looks like you are trying to auto-revamp the users color scheme with the following items:

"sublimepythonide.gutter-mark": "gutter",
"sublimepythonide.mark.warning": "warning",
"sublimepythonide.mark.error": "error"
ihdavids commented 3 years ago

My silly little OrgExtended plugin has some code in the orginternalhelpers.py file that can handle parsing a sublime-color-scheme and might help with this.

I have a menu option to generate a custom scheme from your current scheme, much like you are doing.

ihdavids commented 3 years ago

For now I would suggest:

def generate_color_scheme_async():
    # find and parse current theme
    prefs = sublime.load_settings("Preferences.sublime-settings")
    scheme = prefs.get('color_scheme')

    if scheme is None:
        return

    if(".sublime-color-scheme" in scheme):
        return