Closed nwoltman closed 2 years ago
I can't reproduce in my regular environment. What version of Sublime are you running?
I'm on the most recent stable version of Sublime, build 4121.
I'm on 4120, which should be identical. I tried on a fresh 4121 install, and could not reproduce there either.
This is a weird thing to be happening. It looks like the get_extensions
macro is getting a configuration
argument of None
. That should be impossible.
Can you run the following in the Python 3.3 console and paste the result?
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
I had this error with build 4121 as well. The error is gone after restarting and rebuilding syntaxes (with no project open).
I'm at a loss. I can't think if any reason why configuration
should be None
there. And without any hypothesis as to what might be wrong, I can't reproduce it, either. I was just about ready to chalk it down to cosmic rays or something, except that at least two people are having the problem.
@nwoltman When you run the rebuild command, are there any errors in the Python console?
Can you run the following in the Python 3.3 console and paste the result?
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
This is what I get when I run that in the console:
>>> import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
import JSCustom.src.configurations; JSCustom.src.configurations.get_configurations(sublime.load_settings('JS Custom.sublime-settings'))
Traceback (most recent call last):
File "__main__", line 1, in <module>
ModuleNotFoundError: No module named 'JSCustom'
After trying to rebuild syntaxes and then opening the Python console, here's what I'm seeing:
[JS Custom] Building configuration Default…
[JS Custom] Building configuration TypeScript…
error parsing lexer: Packages/User/JS Custom/Syntaxes/Default.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/Default.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/React.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/React.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/TypeScript.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/TypeScript.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/TypeScript (JSX).sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/TypeScript (JSX).sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/~embed.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/~embed.sublime-syntax:1:1
generating syntax summary
error: Error loading syntax file "Packages/User/JS Custom/Syntaxes/Default.sublime-syntax": Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/Default.sublime-syntax:1:1
[JS Custom] Building configuration React…
[JS Custom] Building configuration ~embed…
[JS Custom] Building configuration TypeScript (JSX)…
error parsing lexer: Packages/User/JS Custom/Syntaxes/Default.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/Default.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/React.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/React.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/TypeScript.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/TypeScript.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/TypeScript (JSX).sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/TypeScript (JSX).sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/~embed.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/~embed.sublime-syntax:1:1
generating syntax summary
indexing [job 61]: no files were indexed out of the 4096 queued, abandoning crawl
error parsing lexer: Packages/User/JS Custom/Syntaxes/Default.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/Default.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/React.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/React.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/TypeScript.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/TypeScript.sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/TypeScript (JSX).sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/TypeScript (JSX).sublime-syntax:1:1
error parsing lexer: Packages/User/JS Custom/Syntaxes/~embed.sublime-syntax: Error trying to parse sublime-syntax: %YAML indicator is required in Packages/User/JS Custom/Syntaxes/~embed.sublime-syntax:1:1
generating syntax summary
Although update: It's building just fine now. Fully closing Sublime and restarting fixed it. I guess I hadn't quit Sublime or restarted my computer in a few days.
Those are some pretty wild errors. It looks like there was some kind of problem with Sublime reading the package files. Whatever the root cause was, I suspect it had something to do with the fact that Python isn't really designed for hot module reloading. If restarting Sublime fixed it, then I'm not overly concerned.
If the problem recurs, feel free to repoen.
JSCustom recently updated to v4.2.1 (right after updating Sublime to build 4121) and now the syntaxes build fails. Removing the package and reinstalling doesn't help.
Here's the error message I'm getting after rebuilding syntaxes using the default config: