Hi, sorry for the stupid question but I keep encou...
# hamilton-help
r
Hi, sorry for the stupid question but I keep encountering this error:
Copy code
>>> from hamilton.function_modifiers import unpack_fields
ImportError: cannot import name 'unpack_fields' from 'hamilton.function_modifiers' (/root/venv/lib/python3.10/site-packages/hamilton/function_modifiers/__init__.py)
What would be the alternatives to this so that I could extract something from a tuple?
s
@extract_fields
will do this for a dictionary. https://hamilton.apache.org/reference/decorators/extract_fields/
c
Unfortunately,
unpack_fields
is not available in version 1.88.0 (the latest release on PyPI), but will be in the upcoming 1.89.0. Our release cadence has been temporarily slowed as the codebase has been transferred to the ASF.
đź‘€ 1
🙌 2
r
thanks, guys. It’s really hard and often inconvenient to create a “hacky” way to work around the `unpack_fields`incompatibility. Looking forward to 1.89.0 🙂.