Unity-Technologies/ml-agents · error · FileNotFoundError

The entry {self.identifier} does not contain a valid url for

Error message

The entry {self.identifier} does not contain a valid url for this platform

What it means

FileNotFoundError raised by RemoteRegistryEntry.make() when the registry entry has no download URL for the current platform (linux/darwin/win32 URL field is None). The entry exists but simply doesn't ship a binary for your OS.

Source

Thrown at ml-agents-envs/mlagents_envs/registry/remote_registry_entry.py:59

        self._win_url = win_url
        self._add_args = additional_args
        self._tmp_dir_override = tmp_dir

    def make(self, **kwargs: Any) -> BaseEnv:
        """
        Returns the UnityEnvironment that corresponds to the Unity executable found at
        the provided url. The arguments passed to this method will be passed to the
        constructor of the UnityEnvironment (except for the file_name argument)
        """
        url = None
        if platform == "linux" or platform == "linux2":
            url = self._linux_url
        if platform == "darwin":
            url = self._darwin_url
        if platform == "win32":
            url = self._win_url
        if url is None:
            raise FileNotFoundError(
                f"The entry {self.identifier} does not contain a valid url for this "
                "platform"
            )
        path = get_local_binary_path(
            self.identifier, url, tmp_dir=self._tmp_dir_override
        )
        if "file_name" in kwargs:
            kwargs.pop("file_name")
        args: List[str] = []
        if "additional_args" in kwargs:
            if kwargs["additional_args"] is not None:
                args += kwargs["additional_args"]
        if self._add_args is not None:
            args += self._add_args
        kwargs["additional_args"] = args
        return UnityEnvironment(file_name=path, **kwargs)

View on GitHub (pinned to 3ecb446f75)

Solutions

  1. Pick an entry that provides a binary for your platform (check the manifest's platform urls).
  2. Build the environment yourself in Unity and load it with UnityEnvironment(file_name=...).
  3. Edit/extend the manifest to add a valid url for your platform.
  4. Contribute or download a community build for the missing platform.

Example fix

// before
entry = registry['3dball-headless']  # has only win_url
env = entry.make()  # on linux -> FileNotFoundError
// after
env = UnityEnvironment(file_name='./3DBall_linux/UnityEnvironment.x86_64')
Defensive patterns

Strategy: fallback

Validate before calling

import platform
PLAT_KEY = {"Linux": "linux", "Darwin": "darwin", "Windows": "win32"}[platform.system()]
url = getattr(entry, f"_{PLAT_KEY}_url", None)
if url is None:
    raise RuntimeError(f"{entry.identifier} has no {PLAT_KEY} binary")
env = entry.make()

Type guard

def has_platform_binary(entry, plat: str) -> bool:
    return getattr(entry, f"_{plat}_url", None) is not None

Try / catch

try:
    env = entry.make()
except FileNotFoundError:
    env = UnityEnvironment(file_name=local_build_path)

Prevention

When it happens

Trigger: entry.make() where platform resolves to a url field (_linux_url/_darwin_url/_win_url) that was never populated in the environment manifest.

Common situations: Environments published only for Windows being made from Linux/macOS; older or partial manifests missing some platform URLs; typos in manifest keys leaving a platform url null.

Related errors


AI-assisted analysis of Unity-Technologies/ml-agents@3ecb446f75 (2026-09-02). Data as JSON: /api/errors/6cd907a694c1fed5. Report an issue: GitHub.