Comments (12)
Great, thank you for the example option
from esbonio.
I have also upgraded all packages to the latest versions (including pygls), as far as was possible, but that did not solve the exception.
from esbonio.
One of the things that esbonio
does when inspecting your sphinx project is to export your conf.py
to local a SQLite db where the server can easily query certain config values (like primary_domain
).
Unfortunately, it looks like it found something it couldn't handle correctly
keys must be str, int, float, bool or None, not re.Pattern
From the error, I'm not entirely sure where the issue is... but I'm guessing you a regular expression somewhere in your conf.py
. If you comment it out for a moment, does the issue go away?
from esbonio.
In conf.py
we have the following statement, which is the same as in Sphinx docs: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_allowed_redirects
linkcheck_allowed_redirects = {
# All HTTP redirections from the source URI to the canonical URI will be treated as "working".
r'https://sphinx-doc\.org/.*': r'https://sphinx-doc\.org/en/master/.*'
}
When I disable this statement and restart VS Code, the error goes away and the Esbonio HTML preview is working.
from esbonio.
Hi,
I tried the new Esbonio pre-release v0.95.0, but unfortunately I still get the same error.
When I disable the linkcheck_allowed_redirects
as mentioned before, the error goes away.
Here is my new logfile:
[client] Unable to resolve command lsp-devtools: Error: Command failed: command -v lsp-devtools
'command' is not recognized as an internal or external command,
operable program or batch file.
[client] Using user configured Python: .venv\Scripts\python.exe
[client] Server start command: .venv\Scripts\python.exe -S -m esbonio.server
[client] LanguageClientOptions: {
"documentSelector": [
{
"scheme": "file",
"language": "restructuredtext"
},
{
"scheme": "file",
"language": "markdown"
}
],
"outputChannel": {
"name": "Esbonio"
},
"connectionOptions": {
"maxRestartCount": 0
},
"middleware": {
"workspace": {},
"window": {}
}
}
[client] Starting Language Server
[esbonio] Loaded extension 'esbonio.server.features.log'
[esbonio] Loaded extension 'esbonio.server.features.project_manager'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_manager'
[esbonio] Loaded extension 'esbonio.server.features.preview_manager'
[esbonio] Loaded extension 'esbonio.server.features.directives'
[esbonio] Loaded extension 'esbonio.server.features.roles'
[esbonio] Loaded extension 'esbonio.server.features.rst.directives'
[esbonio] Loaded extension 'esbonio.server.features.rst.roles'
[esbonio] Loaded extension 'esbonio.server.features.myst.directives'
[esbonio] Loaded extension 'esbonio.server.features.myst.roles'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_support.diagnostics'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_support.symbols'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_support.directives'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_support.roles'
[esbonio] Initialising esbonio v1.0.0b5, using Python v3.11.9 on Windows-10
[esbonio] Language client: Visual Studio Code 1.91.1
[esbonio.Configuration] Scanning workspace folder: 'c:\git\sigma'
[esbonio.Configuration] workspace/configuration: {
"items": [
{
"section": "esbonio"
},
{
"scopeUri": "file:///c%3A/git/sigma",
"section": "esbonio"
}
]
}
[esbonio.Configuration] Workspace 'None' configuration: {
"server": {
"enabled": true,
"documentSelector": [],
"startupModule": "esbonio.server",
"excludedModules": [],
"includedModules": [],
"pythonPath": ".venv\\Scripts\\python.exe",
"completion": {
"preferredInsertBehavior": "replace"
},
"enableDevTools": false,
"debug": false,
"showDeprecationWarnings": false
},
"sphinx": {
"buildCommand": [
"sphinx-build",
"-M",
"html",
"docs",
"docs/_build",
"-t",
"preview",
"-W",
"--keep-going"
],
"pythonCommand": [
".venv\\Scripts\\python.exe"
],
"enableDevTools": false,
"pythonPath": []
},
"preview": {
"showLineMarkers": false
},
"logging": {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
},
"trace": {
"server": "off"
}
}
[esbonio.Configuration] Workspace 'file:///c%3A/git/sigma' configuration: {
"server": {
"enabled": true,
"documentSelector": [],
"startupModule": "esbonio.server",
"excludedModules": [],
"includedModules": [],
"pythonPath": ".venv\\Scripts\\python.exe",
"completion": {
"preferredInsertBehavior": "replace"
},
"enableDevTools": false,
"debug": false,
"showDeprecationWarnings": false
},
"sphinx": {
"buildCommand": [
"sphinx-build",
"-M",
"html",
"docs",
"docs/_build",
"-t",
"preview",
"-W",
"--keep-going"
],
"pythonCommand": [
".venv\\Scripts\\python.exe"
],
"enableDevTools": false,
"pythonPath": []
},
"preview": {
"showLineMarkers": false
},
"logging": {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
},
"trace": {
"server": "off"
}
}
[esbonio] Registered 'workspace/didChangeConfiguration' handler
[esbonio] Registered 'workspace/didChangeWatchedFiles' handler
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
}
[esbonio.Configuration] LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Previous: None
[esbonio.Configuration] Current: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] ConfigChangeEvent(scope='', value=LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False), previous=None)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"showLineMarkers": false
}
[esbonio.Configuration] PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Previous: None
[esbonio.Configuration] Current: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] ConfigChangeEvent(scope='', value=PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False), previous=None)
[esbonio] Scheduled task: <Task pending name='Task-8' coro=<PreviewManager.show_preview_uri() running at c:\Users\...\.vscode\extensions\swyddfa.esbonio-0.95.0\bundled\libs\esbonio\server\features\preview_manager\__init__.py:183>>
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: None
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] ConfigChangeEvent(scope='', value=CompletionConfig(preferred_insert_behavior='replace'), previous=None)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: None
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] ConfigChangeEvent(scope='', value=CompletionConfig(preferred_insert_behavior='replace'), previous=None)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: None
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] ConfigChangeEvent(scope='', value=CompletionConfig(preferred_insert_behavior='replace'), previous=None)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: None
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] ConfigChangeEvent(scope='', value=CompletionConfig(preferred_insert_behavior='replace'), previous=None)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
}
[esbonio.Configuration] LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Previous: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Current: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"showLineMarkers": false
}
[esbonio.Configuration] PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Previous: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Current: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
}
[esbonio.Configuration] LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Previous: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Current: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"showLineMarkers": false
}
[esbonio.Configuration] PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Previous: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Current: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
}
[esbonio.Configuration] LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Previous: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Current: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"showLineMarkers": false
}
[esbonio.Configuration] PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Previous: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Current: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
}
[esbonio.Configuration] LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Previous: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Current: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"showLineMarkers": false
}
[esbonio.Configuration] PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Previous: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Current: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
}
[esbonio.Configuration] LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Previous: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Current: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"showLineMarkers": false
}
[esbonio.Configuration] PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Previous: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Current: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio] Task finished: <Task finished name='Task-8' coro=<PreviewManager.show_preview_uri() done, defined at c:\Users\...\.vscode\extensions\swyddfa.esbonio-0.95.0\bundled\libs\esbonio\server\features\preview_manager\__init__.py:183> result=None>
[esbonio.SphinxManager] No client found, creating new subscription
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"level": "debug",
"stderr": true,
"window": false,
"config": {}
}
[esbonio.Configuration] LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Previous: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] Current: LoggingConfig(level='debug', format='[%(name)s] %(message)s', filepath=None, stderr=True, window=False, config={}, show_deprecation_warnings=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"showLineMarkers": false
}
[esbonio.Configuration] PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Previous: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] Current: PreviewConfig(bind='localhost', http_port=0, ws_port=0, show_line_markers=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
"preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Previous: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] Current: CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: 'file:///c%3A/git/sigma'
[esbonio.Configuration] Resolved config: {
"pythonCommand": [
".venv\\Scripts\\python.exe"
],
"buildCommand": [
"sphinx-build",
"-M",
"html",
"docs",
"docs/_build",
"-t",
"preview",
"-W",
"--keep-going"
],
"enableDevTools": false,
"pythonPath": []
}
[esbonio.Configuration] SphinxConfig(enable_dev_tools=False, python_command=['.venv\\Scripts\\python.exe'], build_command=['sphinx-build', '-M', 'html', 'docs', 'docs/_build', '-t', 'preview', '-W', '--keep-going'], env_passthrough=[], cwd='', python_path=[])
[esbonio.Configuration] Previous: None
[esbonio.Configuration] Current: SphinxConfig(enable_dev_tools=False, python_command=['.venv\\Scripts\\python.exe'], build_command=['sphinx-build', '-M', 'html', 'docs', 'docs/_build', '-t', 'preview', '-W', '--keep-going'], env_passthrough=[], cwd='', python_path=[])
[esbonio.Configuration] ConfigChangeEvent(scope='file:///c%3A/git/sigma', value=SphinxConfig(enable_dev_tools=False, python_command=['.venv\\Scripts\\python.exe'], build_command=['sphinx-build', '-M', 'html', 'docs', 'docs/_build', '-t', 'preview', '-W', '--keep-going'], env_passthrough=[], cwd='', python_path=[]), previous=None)
[esbonio.SphinxManager] Cwd: c:\git\sigma
[esbonio.SphinxManager] Build command: ['sphinx-build', '-M', 'html', 'docs', 'docs/_build', '-t', 'preview', '-W', '--keep-going']
[esbonio.SphinxManager] Client created for scope file:///c%3A/git/sigma
[esbonio.SphinxManager] SphinxClient[49c7286b-99b9-4706-9648-cb205a396e6f]: None -> ClientState.Starting
[esbonio.SphinxManager] Starting sphinx agent: .venv\Scripts\python.exe -m sphinx_agent
[esbonio.ProjectManager] No applicable project for uri: file:///c%3A/git/sigma/docs/design/subsystem1/software.rst
[esbonio.ProjectManager] No applicable project for uri: file:///c%3A/git/sigma/docs/design/subsystem1/software.rst
Running Sphinx v7.3.7
loading pickled environment... done
[esbonio.SphinxManager] Unable to start SphinxClient: Handler <function dump_config at 0x00000238D3083D80> for event 'builder-inited' threw an exception (exception: keys must be str, int, float, bool or None, not re.Pattern)
Traceback (most recent call last):
File "c:\Users\...\.vscode\extensions\swyddfa.esbonio-0.95.0\bundled\libs\esbonio\server\features\sphinx_manager\client_subprocess.py", line 209, in start
self.sphinx_info = await self.protocol.send_request_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pygls.exceptions.JsonRpcInternalError: Handler <function dump_config at 0x00000238D3083D80> for event 'builder-inited' threw an exception (exception: keys must be str, int, float, bool or None, not re.Pattern)
[esbonio.SphinxManager] SphinxClient[49c7286b-99b9-4706-9648-cb205a396e6f]: ClientState.Starting -> ClientState.Errored
from esbonio.
@alcarney Or should I create a new issue?
from esbonio.
Or should I create a new issue
No it's fine we may as well use this one
from esbonio.
Huh, I am surprised it's still an issue, the example option you shared above is now part of the conf.py
used in the test suite so it should be working... 🤔
Running Sphinx v7.3.7
loading pickled environment... done
This is a bit of a long shot, but if you enable linkcheck_allowed_redirects
, delete your docs/_build
directory and restart the server does it work then?
I'm wondering if Sphinx could still be using the old version of the code
from esbonio.
We have a script to clear (remove) the build directory. That's another thing I was wondering about; when I try to delete the docs/_build
directory I get the following errors:
$ rm -fr docs/_build
rm: cannot remove 'docs/_build/html/esbonio.db': Device or resource busy
rm: cannot remove 'docs/_build/html/esbonio.db-shm': Device or resource busy
rm: cannot remove 'docs/_build/html/esbonio.db-wal': Device or resource busy
If I try to delete it in Windows Explorer, it says The action can't be completed because the file is open in Python
. When I close VS Code and then delete the folder it's gone. How can we make sure the docs/_build
directory can be removed successfully? This should work independently from the Preview function. For example, we have scripts to clear the entire code and documentation builds and rebuild everything from scratch, if necessary.
Unfortunately the dump_config
exception comes back after restarting VS Code.
BTW: We have multiple regular expressions in our conf.py
, but the one with linkcheck_allowed_redirects
seems to solve the error message each time.
from esbonio.
I have stripped my conf.py
to the minimum, but keep getting the same exception...
For what it's worth, my current list of installed pip packages is:
Package Version
----------------------------- ---------
alabaster 0.7.16
attrs 22.2.0
Babel 2.12.1
build 0.10.0
cattrs 23.1.2
certifi 2022.12.7
charset-normalizer 3.1.0
click 8.1.3
colorama 0.4.6
docutils 0.18.1
idna 3.4
imagesize 1.4.1
Jinja2 3.1.2
jsonschema 4.19.0
jsonschema-specifications 2023.7.1
lsprotocol 2023.0.1
MarkupSafe 2.1.2
packaging 23.0
pip 24.0
pip-tools 7.3.0
platformdirs 4.2.0
pygls 1.3.0
Pygments 2.14.0
pyproject_hooks 1.0.0
pyspellchecker 0.7.1
referencing 0.30.2
requests 2.28.2
requests-file 1.5.1
rpds-py 0.9.2
setuptools 65.5.0
six 1.16.0
snowballstemmer 2.2.0
Sphinx 7.3.7
sphinx-data-viewer 0.1.2
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.1
sphinxcontrib-jquery 4.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.10
urllib3 1.26.15
wheel 0.40.0
[notice] A new release of pip is available: 24.0 -> 24.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
from esbonio.
If I try to delete it in Windows Explorer, it says
The action can't be completed because the file is open in Python
.
Ah, I always forget Windows does not let you delete open files 😅
How can we make sure the
docs/_build
directory can be removed successfully?
One option would be to rework the server so that it does not keep a persistent connection open to the esbonio.db*
files. Though perhaps the easiest solution would be to store them outside of docs/_build
so that they don't interfere.
I picked the build directory simply because it felt natural and it's clear which project they're associated with - I don't suppose you have any thoughts on what an alternative could be?
Unfortunately the dump_config exception comes back after restarting VS Code.
About that... for some reason the release build for v0.95.0
pulled in the previous version of the server, instead of the one containing the fix for this issue. I've released v0.95.1
which this time, hopefully, actually contains the correct version of the server! 🤞
from esbonio.
Ah, I always forget Windows does not let you delete open files 😅
Haha, yes, Windows is very picky about this. If it only would tell who/what opened a file. In this case it's referring to Python, but most of the times it just says something like 'cannot complete operation, file is opened by another process'. Not annoying at all 😅
Though perhaps the easiest solution would be to store them outside of
docs/_build
so that they don't interfere.
Yes, I agree, storing them outside of docs/_build
would be the easiest and also cleanest solution.
I picked the build directory simply because it felt natural and it's clear which project they're associated with - I don't suppose you have any thoughts on what an alternative could be?
Yes, I thought so that was the reason. I have created a new issue and expressed my thoughts in it: #865
I've released v0.95.1 which this time, hopefully, actually contains the correct version of the server!
Yes, thank you, now it works!
from esbonio.
Related Issues (20)
- `KeyError` related to deleted files in the sphinx agent
- Server does not end all progress tokens HOT 2
- Rebuild files that contain diagnostics
- JsonRpcInternalError path mount HOT 4
- `:name:` + `:numref:` links do not update properly HOT 2
- It's impossible to configure the server for projects located on a Windows network share HOT 1
- [Feature]: Make clickable paths to .uml files (for the uml directive) HOT 2
- It's hard to debug errors in the sphinx agent
- Support for Jupyter-Book HOT 2
- Print statement in Sphinx event callback breaks esbonio HOT 2
- Runtime error when defining Sphinx tag HOT 4
- Flaky test
- Cannot clear `docs/_build` directory due to locked database files HOT 4
- The reStructureText extension preview functionality is defunct. The reStructureText team says this is esbonio issue. HOT 4
- Release and development version both do not display preview HOT 9
- Cannot use esbonio with `ablog` extension
- Scrolling editor no longer syncs with previewer after preview scroll HOT 2
- Scrolling the previewer by a single line can cause the previewer to scrol to the next or previous section heading HOT 3
- Fail to render preview HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esbonio.