oraios/serena · error · FileNotFoundError

Download failed? Could not find cue executable at {cue_execu

Error message

Download failed? Could not find cue executable at {cue_executable_path}

What it means

This FileNotFoundError is raised when, after attempting to download and extract the cue language server binary, the expected cue executable still does not exist at its predicted path inside the resources directory. It guards against silent download/extraction failures (wrong URL, unsupported archive layout, blocked network).

Source

Thrown at src/solidlsp/language_servers/cue_language_server.py:176

    def _create_dependency_provider(self) -> LanguageServerDependencyProvider:
        return self.DependencyProvider(self._custom_settings, self._ls_resources_dir)

    class DependencyProvider(LanguageServerDependencyProviderSinglePath):
        """Resolves a ``cue`` executable, downloading the pinned release if it isn't cached yet."""

        def _get_or_install_core_dependency(self) -> str:
            cue_version = self._custom_settings.get("cue_version", DEFAULT_CUE_VERSION)
            deps = CueLanguageServer._runtime_dependencies(cue_version)
            dependency = deps.get_single_dep_for_current_platform()

            install_dir = os.path.join(self._ls_resources_dir, f"cue-{cue_version}")
            cue_executable_path = deps.binary_path(install_dir)
            if not os.path.exists(cue_executable_path):
                log.info(f"Downloading and extracting cue from {dependency.url} to {install_dir}")
                deps.install(install_dir)
            if not os.path.exists(cue_executable_path):
                raise FileNotFoundError(f"Download failed? Could not find cue executable at {cue_executable_path}")
            os.chmod(cue_executable_path, 0o755)
            return cue_executable_path

        def _create_launch_command(self, core_path: str) -> list[str]:
            # cue's LSP mode is activated via the `lsp` subcommand; it speaks LSP over stdio.
            return [core_path, "lsp"]

    def _create_base_initialize_params(self) -> dict:
        """Returns the init params for ``cue lsp``."""
        result = {
            "capabilities": {
                "workspace": {
                    "applyEdit": True,
                    "workspaceEdit": {"documentChanges": True},
                    "symbol": {"symbolKind": {"valueSet": list(range(1, 27))}},
                    "workspaceFolders": True,
                    "configuration": True,
                },

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Check network connectivity/proxy and re-run so the dependency downloads again.
  2. Inspect the install_dir (resources/cue-<version>) to see what was actually extracted; adjust or clear it and retry.
  3. Verify the pinned cue_version and download URL in the dependency provider still exist upstream.
  4. Install cue manually (e.g. 'go install' or official release) and ensure the binary lands at the expected path, or point the provider at it.
  5. Check disk space and write permissions on the resources directory.

Example fix

# before: stale/partial extraction
cue-v0.9.2/  (empty)
// after: clear and reinstall
rm -rf ~/.serena/language_servers/static/cue-*  # then restart
Defensive patterns

Strategy: validation

Validate before calling

import os
install_dir = os.path.join(resources_dir, f"cue-{cue_version}")
expected = os.path.join(install_dir, 'cue')  # adjust per deps.binary_path
if not os.path.exists(expected):
    os.makedirs(install_dir, exist_ok=True)
    # force a clean (re)install or verify network before proceeding

Try / catch

try:
    cue_path = provider._get_or_install_core_dependency()
except FileNotFoundError as e:
    logging.warning('cue download/extract failed: %s — retrying after cache cleanup', e)
    shutil.rmtree(install_dir, ignore_errors=True)
    cue_path = provider._get_or_install_core_dependency()

Prevention

When it happens

Trigger: _get_or_install_core_dependency computes cue_executable_path = deps.binary_path(install_dir); os.path.exists fails both before and after deps.install(install_dir) — i.e. the install step did not place the binary where expected.

Common situations: Network outage or proxy blocking the download URL; the archive extracted to an unexpected subdirectory; cue version pinned in deps no longer published upstream; disk full or permissions preventing extraction.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/617732705f315dee. Report an issue: GitHub.