Hello,
I'm encountering a persistent ValueError: not enough values to unpack (expected 4, got 2)
when trying to load any custom recipe with positional arguments. This error occurs even after a complete environment rebuild with a recommended Python version.
System Details:
- Prodigy Version: (Please run
prodigy --version
in your terminal and paste the result here) - Python Version: Python 3.10 (installed via Conda)
- Operating System: macOS (Apple Silicon M-series)
Problem Description:
When I run a minimal test recipe that defines two positional arguments, Prodigy fails on startup with the "not enough values to unpack" error before any data is processed.
Debugging Steps Performed:
I have already performed the following steps with guidance, and the error still persists:
- Created a brand new, clean
conda
environment withpython=3.10
. - Installed Prodigy v1.16.0 using the modern
--extra-index-url
pip command, which successfully installed compatible versions of spaCy (3.7.5) and NumPy (1.26.4). - Confirmed that a minimal test recipe with zero arguments loads correctly.
- Confirmed that a minimal test recipe with two arguments consistently fails.
This indicates the issue is not with my code or dependencies but likely a deeper incompatibility.
Code to Reproduce the Error (test_recipe.py
):
This minimal script consistently fails in the new environment:
import prodigy
@prodigy.recipe(
"test.correct",
dataset=("Dataset name", "positional"),
source=("Source file", "positional")
)
def test_correct(dataset: str, source: str):
print("This message never appears.")
return { "dataset": dataset, "view_id": "text", "stream": [] }
Command Used:
prodigy test.correct my_test_dataset ./dummy_file.jsonl -F ./test_recipe.py
Full Traceback:
✘ Couldn't load Python code: ./test_recipe.py
not enough values to unpack (expected 4, got 2)