<#18199 InvalidFieldException using _defaults_ and...
# github-notifications
q
#18199 InvalidFieldException using __defaults__ and environments-preview Issue created by psontag Describe the bug I have configured the
[environments-preview.names]
section in my
pants.toml
. Additionally I have applied the default to skip mypy for all my tests in the top level BUILD file where I have also defined my
docker_environment
. When I now run any pants command I get the below error:
Copy code
āžœ pants --version
13:49:46.90 [ERROR] 1 Exception encountered:

MappingError: Failed to parse ./BUILD:
InvalidFieldException: Unrecognized field `skip_mypy` for target python_tests. Valid fields are: batch_compatibility_tag, dependencies, description, environment, extra_env_vars, interpreter_constraints, overrides, resolve, run_goal_use_sandbox, runtime_package_dependencies, skip_tests, sources, tags, timeout, xdist_concurrency.


Use --print-stacktrace for more error details and/or -ldebug for more logs. 
See <https://www.pantsbuild.org/v2.16/docs/troubleshooting> for common issues.
Consider reaching out for help: <https://www.pantsbuild.org/v2.16/docs/getting-help>
When I remove the
[environments-preview.names]
section the commands work again:
Copy code
āžœ pants --version
13:53:34.74 [INFO] Initializing scheduler...
13:53:38.14 [INFO] Scheduler initialized.
2.16.0.dev5
A clear and concise description of the bug. Pants version 2.16.0.dev5, we are using the new scie-pants binary in version 0.3.2 OS MacOS Additional info I have a reproducible example on the branch here https://github.com/psontag/pexample/tree/pants-reproduce-field-issue Just run any pants command to trigger it. pantsbuild/pants