Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dump_config doesn't handle all values correctly #843

Closed
marcel-22 opened this issue Jun 25, 2024 · 12 comments · Fixed by #855
Closed

dump_config doesn't handle all values correctly #843

marcel-22 opened this issue Jun 25, 2024 · 12 comments · Fixed by #855
Labels
bug Something isn't working lsp Issues that relate to the language server
Milestone

Comments

@marcel-22
Copy link

Expected behavior

Have a working preview function with prerelease version 0.94.2 of Esbonio.

Actual behavior

Got an exception instead.

Log output

[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.1 on Windows-10
[esbonio] Language client: Visual Studio Code 1.90.2
[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,
    "installBehavior": "nothing"
  },
  "sphinx": {
    "pythonCommand": [
      ".venv\\Scripts\\python.exe"
    ],
    "enableDevTools": false,
    "pythonPath": [],
    "forceFullBuild": false,
    "tags": [
      "preview"
    ]
  },
  "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,
    "installBehavior": "nothing"
  },
  "sphinx": {
    "pythonCommand": [
      ".venv\\Scripts\\python.exe"
    ],
    "enableDevTools": false,
    "pythonPath": [],
    "forceFullBuild": false,
    "tags": [
      "preview"
    ]
  },
  "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: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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.94.2\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: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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.94.2\bundled\libs\esbonio\server\features\preview_manager\__init__.py:183> result=None>
[esbonio] workspace/didChangeConfiguration: DidChangeConfigurationParams(settings=None)
[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,
    "installBehavior": "nothing"
  },
  "sphinx": {
    "pythonCommand": [
      ".venv\\Scripts\\python.exe"
    ],
    "enableDevTools": false,
    "pythonPath": [],
    "forceFullBuild": false,
    "tags": [
      "preview"
    ]
  },
  "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,
    "installBehavior": "nothing"
  },
  "sphinx": {
    "pythonCommand": [
      ".venv\\Scripts\\python.exe"
    ],
    "enableDevTools": false,
    "pythonPath": [],
    "forceFullBuild": false,
    "tags": [
      "preview"
    ]
  },
  "preview": {
    "showLineMarkers": false
  },
  "logging": {
    "level": "debug",
    "stderr": true,
    "window": false,
    "config": {}
  },
  "trace": {
    "server": "off"
  }
}
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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.SphinxManager] No client found, creating new subscription
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
  "stderr": true,
  "config": {},
  "window": false,
  "level": "debug"
}
[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: {
  "pythonPath": [],
  "enableDevTools": false,
  "forceFullBuild": false,
  "pythonCommand": [
    ".venv\\Scripts\\python.exe"
  ],
  "tags": [
    "preview"
  ]
}
[esbonio.Configuration] SphinxConfig(enable_dev_tools=False, python_command=['.venv\\Scripts\\python.exe'], build_command=[], 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=[], 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=[], env_passthrough=[], cwd='', python_path=[]), previous=None)
[esbonio.SphinxManager] Trying path: c:\git\sigma\docs\design\subsystem1
[esbonio.SphinxManager] Trying path: c:\git\sigma\docs\design
[esbonio.SphinxManager] Trying path: c:\git\sigma\docs
[esbonio.SphinxManager] Cwd: c:\git\sigma
[esbonio.SphinxManager] Build command: ['sphinx-build', '-M', 'dirhtml', 'c:\\git\\sigma\\docs', 'C:\\Users\\...\\AppData\\Local\\swyddfa\\esbonio\\Cache\\72b5176bb32aa42952d4590beb6b66dd']
[esbonio.SphinxManager] Client created for scope file:///c%3A/git/sigma
[esbonio.SphinxManager] SphinxClient[754140e6-427c-44bf-acb3-c84171dc2a5d]: None -> ClientState.Starting
[esbonio.SphinxManager] Starting sphinx agent: .venv\Scripts\python.exe -m sphinx_agent
[client] sphinx/clientCreated: {
  "id": "754140e6-427c-44bf-acb3-c84171dc2a5d",
  "scope": "file:///c%3A/git/sigma",
  "config": {
    "pythonCommand": [
      ".venv\\Scripts\\python.exe"
    ],
    "buildCommand": [
      "sphinx-build",
      "-M",
      "dirhtml",
      "c:\\git\\sigma\\docs",
      "C:\\Users\\...\\AppData\\Local\\swyddfa\\esbonio\\Cache\\72b5176bb32aa42952d4590beb6b66dd"
    ],
    "cwd": "c:\\git\\sigma",
    "pythonPath": [
      "c:\\Users\\...\\.vscode\\extensions\\swyddfa.esbonio-0.94.2\\bundled\\libs\\esbonio"
    ]
  }
}
[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
[esbonio.SphinxManager] Unable to start SphinxClient: Handler <function dump_config at 0x00000235A78F1B20> 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.94.2\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 0x00000235A78F1B20> for event 'builder-inited' threw an exception (exception: keys must be str, int, float, bool or None, not re.Pattern)
[esbonio.SphinxManager] SphinxClient[754140e6-427c-44bf-acb3-c84171dc2a5d]: ClientState.Starting -> ClientState.Errored
[client] sphinx/clientErrored: {
  "id": "754140e6-427c-44bf-acb3-c84171dc2a5d",
  "error": "JsonRpcInternalError: Handler <function dump_config at 0x00000235A78F1B20> for event 'builder-inited' threw an exception (exception: keys must be str, int, float, bool or None, not re.Pattern)",
  "detail": "Traceback (most recent call last):\n  File \"c:\\Users\\...\\.vscode\\extensions\\swyddfa.esbonio-0.94.2\\bundled\\libs\\esbonio\\server\\features\\sphinx_manager\\client_subprocess.py\", line 209, in start\n    self.sphinx_info = await self.protocol.send_request_async(\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\npygls.exceptions.JsonRpcInternalError: Handler <function dump_config at 0x00000235A78F1B20> for event 'builder-inited' threw an exception (exception: keys must be str, int, float, bool or None, not re.Pattern)\n"
}

(Optional) Settings from conf.py

No response

@marcel-22 marcel-22 added bug Something isn't working triage Issues needing triage labels Jun 25, 2024
@marcel-22
Copy link
Author

I have also upgraded all packages to the latest versions (including pygls), as far as was possible, but that did not solve the exception.

@alcarney alcarney changed the title Exception JsonRpcInternalError dump_config doesn't handle all values correctly Jun 26, 2024
@alcarney
Copy link
Member

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?

@marcel-22
Copy link
Author

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.

@alcarney
Copy link
Member

Great, thank you for the example option

@alcarney alcarney added lsp Issues that relate to the language server and removed triage Issues needing triage labels Jun 30, 2024
@alcarney alcarney added this to Esbonio Jun 30, 2024
@alcarney alcarney added this to the 1.0 milestone Jun 30, 2024
@github-project-automation github-project-automation bot moved this to Todo in Esbonio Jun 30, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Esbonio Jul 16, 2024
@marcel-22
Copy link
Author

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

@marcel-22
Copy link
Author

@alcarney Or should I create a new issue?

@alcarney
Copy link
Member

alcarney commented Jul 22, 2024

Or should I create a new issue

No it's fine we may as well use this one

@alcarney alcarney reopened this Jul 22, 2024
@alcarney
Copy link
Member

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

@marcel-22
Copy link
Author

marcel-22 commented Jul 23, 2024

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.

@marcel-22
Copy link
Author

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

@alcarney
Copy link
Member

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! 🤞

@marcel-22
Copy link
Author

marcel-22 commented Jul 24, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp Issues that relate to the language server
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants