-
Notifications
You must be signed in to change notification settings - Fork 38
Closed as duplicate of#971
Closed as duplicate of#971
Copy link
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.
Description
Description
When running apify run (without flags), the CLI exits with an error even though the Actor completes successfully:
[apify] INFO Exiting Actor ({"exit_code": 0})
Error: ENOENT: no such file or directory, stat '/path/to/project/storage/key_value_stores/default/INPUT.json'
Steps to Reproduce
- Create a new Python Actor:
apify create my-actor(select Python + Playwright template) - Create
storage/key_value_stores/default/INPUT.jsonwith valid input - Run
apify run - Actor runs successfully (exit_code: 0)
- CLI crashes with ENOENT error trying to read INPUT.json
Expected Behavior
The CLI should either:
- Not delete
INPUT.jsonduring the default purge operation, OR - Not attempt to read
INPUT.jsonafter the Actor exits if it was purged
Actual Behavior
The --purge behavior (which is default) deletes the entire key-value store including INPUT.json. After the Actor successfully exits, the CLI attempts to read INPUT.json and fails with ENOENT.
Workarounds
- Use
apify run --no-purge - Use
apify run --input '{"key": "value"}'to pass input via CLI flag
Environment
- apify-cli version: 1.1.1
- OS: macOS (darwin-arm64)
- Node.js: v25.2.1
Additional Context
The Actor code handles missing input gracefully (await Actor.get_input() or {}), so the Actor itself runs fine. The error is purely in the CLI layer after the Actor completes.
Metadata
Metadata
Assignees
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.