{"record":{"id":"d963b5c81aa1ec8c","repo":"crewAIInc/crewAI","slug":"failed-to-run-apifyactorstool-self-name-please","errorCode":null,"errorMessage":"Failed to run ApifyActorsTool {self.name}. Please check your Apify account Actor run logs for more details.Error: {e}","messagePattern":"Failed to run ApifyActorsTool (.+?)\\. Please check your Apify account Actor run logs for more details\\.Error: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/apify_actors_tool/apify_actors_tool.py","lineNumber":102,"sourceCode":"\n    def _run(self, run_input: dict[str, Any]) -> list[dict[str, Any]]:\n        \"\"\"Run the Actor tool with the given input.\n\n        Returns:\n            List[Dict[str, Any]]: Results from the Actor execution.\n\n        Raises:\n            ValueError: If 'actor_tool' is not initialized.\n        \"\"\"\n        try:\n            return self.actor_tool._run(run_input)\n        except Exception as e:\n            msg = (\n                f\"Failed to run ApifyActorsTool {self.name}. \"\n                \"Please check your Apify account Actor run logs for more details.\"\n                f\"Error: {e}\"\n            )\n            raise RuntimeError(msg) from e\n","sourceCodeStart":84,"sourceCodeEnd":103,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/apify_actors_tool/apify_actors_tool.py#L84-L103","documentation":"The crewai-tools ApifyActorsTool wrapper delegates _run() to langchain-apify's actor tool; any exception it raises is caught and re-raised as a RuntimeError naming the tool and pointing to the Apify console's Actor run logs. The original exception is chained (__cause__), so the true cause (bad run input, actor crash, quota) is preserved.","triggerScenarios":"Calling the tool with a run_input the actor rejects (wrong schema, missing required fields); the actor itself crashing or timing out on the Apify platform; account quota/network issues at run time.","commonSituations":"Incorrect run_input JSON for the specific actor; actor version breaking its input contract; free-tier run limits exceeded; passing plain text when the actor expects a structured dict.","solutions":["Open the Apify Console > Actor > Runs and read the failing run's log — the message explicitly directs you there and the root cause is almost always in that log.","Validate run_input against the actor's input schema (visible on the actor's page in Apify Console) and fix mismatches.","Re-run with a minimal known-good input to isolate whether the input or the actor is at fault.","Inspect `e.__cause__` in your except block for the original exception details."],"exampleFix":"# before\nresult = tool._run({\"query\": \"test\"})\n\n# after\ntry:\n    result = tool._run({\"query\": \"test\", \"maxResults\": 10})  # match actor input schema\nexcept RuntimeError as e:\n    logger.error(\"Apify run failed: %s | cause: %s\", e, e.__cause__)\n    raise","handlingStrategy":"try-catch","validationCode":"def validate_actor_input(run_input: dict, required: set[str]) -> bool:\n    return all(run_input.get(k) is not None for k in required)","typeGuard":null,"tryCatchPattern":"try:\n    return self.actor_tool._run(run_input)\nexcept RuntimeError as e:\n    logger.error(\"Apify failure: %s | cause=%r\", e, e.__cause__)\n    if isinstance(e.__cause__, (KeyError, TypeError)):\n        return f\"Invalid run_input: {e.__cause__}. Check the actor's input schema.\"\n    raise","preventionTips":["Always inspect e.__cause__ — the wrapper message alone rarely contains the root cause.","Fetch and validate against the actor's input schema (Apify Console) before invoking.","Test new actor versions with a minimal input before wiring them into production crews."],"tags":["apify","runtime-error","wrapping","external-service"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}