{"record":{"id":"015f473f0ae6c27a","repo":"crewAIInc/crewAI","slug":"multion-package-not-found-please-run-uv-add-mu","errorCode":null,"errorMessage":"`multion` package not found, please run `uv add multion`","messagePattern":"`multion` package not found, please run `uv add multion`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/multion_tool/multion_tool.py","lineNumber":48,"sourceCode":"\n    def __init__(\n        self,\n        api_key: str | None = None,\n        **kwargs: Any,\n    ):\n        super().__init__(**kwargs)\n        try:\n            from multion.client import MultiOn\n        except ImportError:\n            import click\n\n            if click.confirm(\n                \"You are missing the 'multion' package. Would you like to install it?\"\n            ):\n                subprocess.run([\"uv\", \"add\", \"multion\"], check=True)  # noqa: S607\n                from multion.client import MultiOn\n            else:\n                raise ImportError(\n                    \"`multion` package not found, please run `uv add multion`\"\n                ) from None\n        self.session_id = None\n        self.multion = MultiOn(api_key=api_key or os.getenv(\"MULTION_API_KEY\"))\n\n    def _run(\n        self,\n        cmd: str,\n        *args: Any,\n        **kwargs: Any,\n    ) -> str:\n        \"\"\"Run the Multion client with the given command.\n\n        Args:\n            cmd (str): The detailed and specific natural language instructrion for web browsing\n\n            *args (Any): Additional arguments to pass to the Multion client\n            **kwargs (Any): Additional keyword arguments to pass to the Multion client","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/multion_tool/multion_tool.py#L30-L66","documentation":"MultiOnTool's constructor tries to import multion.client.MultiOn; on ImportError it interactively offers `uv add multion`. Declining the click.confirm prompt — or running where no TTY exists so the prompt fails — raises this ImportError. Unlike some tools, this one is explicitly uv-oriented in its guidance.","triggerScenarios":"Instantiating MultiOnTool() without the multion package; CI/containers with no interactive stdin; answering 'no'; `uv` missing from PATH.","commonSituations":"Fresh envs with only crewai-tools installed; Docker deployments where click.confirm receives EOF; pipelines that cannot prompt.","solutions":["Install the package: `uv add multion` or `pip install multion`","Add multion to pinned dependencies for CI to avoid the prompt entirely","Set MULTION_API_KEY so MultiOn(api_key=...) initializes after install"],"exampleFix":"# before\ntool = MultiOnTool()  # ImportError\n\n# after\n# uv add multion\nimport os\nos.environ[\"MULTION_API_KEY\"] = \"...\"\ntool = MultiOnTool()","handlingStrategy":"validation","validationCode":"def multion_available() -> bool:\n    try:\n        from multion.client import MultiOn  # noqa: F401\n        return True\n    except ImportError:\n        return False\n\nassert multion_available(), \"uv add multion\"","typeGuard":null,"tryCatchPattern":"try:\n    tool = MultiOnTool()\nexcept ImportError as e:\n    raise RuntimeError(\"Install multion first: uv add multion\") from e","preventionTips":["Pre-install multion in the runtime image; skip interactive prompts","Set MULTION_API_KEY via environment","Keep optional tool deps in the project lockfile"],"tags":["dependency","multion","interactive-prompt","ci","crewai-tools"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}