Fix metaworld_config.json missing from pip installs and AttributeError crash#3017
Merged
imstevenpmwork merged 1 commit intohuggingface:mainfrom Feb 25, 2026
Conversation
…ror crash 1. Include metaworld_config.json in package distributions by adding it to both MANIFEST.in (for sdist) and pyproject.toml package-data (for wheels). Without this, pip-installed lerobot raises FileNotFoundError when importing the metaworld environment. 2. Fix crash in sanity_check_dataset_name where the error message accesses policy_cfg.type when policy_cfg is None, raising AttributeError instead of the intended ValueError. Fixes huggingface#2958
pkooij
pushed a commit
that referenced
this pull request
Feb 27, 2026
…ror crash (#3017) 1. Include metaworld_config.json in package distributions by adding it to both MANIFEST.in (for sdist) and pyproject.toml package-data (for wheels). Without this, pip-installed lerobot raises FileNotFoundError when importing the metaworld environment. 2. Fix crash in sanity_check_dataset_name where the error message accesses policy_cfg.type when policy_cfg is None, raising AttributeError instead of the intended ValueError. Fixes #2958
xianglunkai
pushed a commit
to xianglunkai/lerobot
that referenced
this pull request
Feb 28, 2026
…ror crash (huggingface#3017) 1. Include metaworld_config.json in package distributions by adding it to both MANIFEST.in (for sdist) and pyproject.toml package-data (for wheels). Without this, pip-installed lerobot raises FileNotFoundError when importing the metaworld environment. 2. Fix crash in sanity_check_dataset_name where the error message accesses policy_cfg.type when policy_cfg is None, raising AttributeError instead of the intended ValueError. Fixes huggingface#2958
sorelferris
pushed a commit
to sorelferris/lerobot
that referenced
this pull request
Mar 1, 2026
…ror crash (huggingface#3017) 1. Include metaworld_config.json in package distributions by adding it to both MANIFEST.in (for sdist) and pyproject.toml package-data (for wheels). Without this, pip-installed lerobot raises FileNotFoundError when importing the metaworld environment. 2. Fix crash in sanity_check_dataset_name where the error message accesses policy_cfg.type when policy_cfg is None, raising AttributeError instead of the intended ValueError. Fixes huggingface#2958
lu391see
pushed a commit
to lu391see/lerobot_tactile
that referenced
this pull request
Mar 24, 2026
…ror crash (huggingface#3017) 1. Include metaworld_config.json in package distributions by adding it to both MANIFEST.in (for sdist) and pyproject.toml package-data (for wheels). Without this, pip-installed lerobot raises FileNotFoundError when importing the metaworld environment. 2. Fix crash in sanity_check_dataset_name where the error message accesses policy_cfg.type when policy_cfg is None, raising AttributeError instead of the intended ValueError. Fixes huggingface#2958
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Packaging:
metaworld_config.jsonis not included when lerobot is installed via pip, causingFileNotFoundErrorat import time for anyone using the metaworld environment. Added the file to bothMANIFEST.in(sdist) andpyproject.tomlpackage-data (wheels).Crash fix:
sanity_check_dataset_nameincontrol_utils.pyaccessespolicy_cfg.typein the error message whenpolicy_cfg is None, raising anAttributeErrorinstead of the intendedValueError.Changes
MANIFEST.in: Addinclude src/lerobot/envs/metaworld_config.jsonpyproject.toml: Add[tool.setuptools.package-data]section withlerobot = ["envs/*.json"]src/lerobot/utils/control_utils.py: Removepolicy_cfg.typereference from error message wherepolicy_cfgis guaranteed to beNoneTest plan
sanity_check_dataset_namebehave correctly (raises ValueError as intended, no longer crashes with AttributeError)Fixes #2958