Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unhelpful error message for missing dependency keys #1

Open
object-Object opened this issue Nov 25, 2023 · 0 comments
Open

Fix unhelpful error message for missing dependency keys #1

object-Object opened this issue Nov 25, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@object-Object
Copy link
Member

Obtaining file:///home/walksanator/git/mods/HexTweaks
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [51 lines of output]
      Traceback (most recent call last):
        File "/home/walksanator/git/mods/HexTweaks/doc/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 167, in prepare_metadata_for_build_editable
          hook = backend.prepare_metadata_for_build_editable
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/home/walksanator/git/mods/HexTweaks/doc/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/walksanator/git/mods/HexTweaks/doc/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/walksanator/git/mods/HexTweaks/doc/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 176, in prepare_metadata_for_build_editable
          whl_basename = build_hook(metadata_directory, config_settings)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatchling/build.py", line 78, in build_editable
          return os.path.basename(next(builder.build(wheel_directory, ['editable'])))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 93, in build
          self.metadata.validate_fields()
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatchling/metadata/core.py", line 243, in validate_fields
          _ = self.version
              ^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatchling/metadata/core.py", line 128, in version
          self._version = self._get_version()
                          ^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatchling/metadata/core.py", line 222, in _get_version
          core_metadata = self.core
                          ^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatchling/metadata/core.py", line 174, in core
          metadata_hook.update(self.core_raw_metadata)
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatch_gradle_version/plugins/metadata_hook/base.py", line 35, in update
          self.parse_dependencies(self.dependencies),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatch_gradle_version/common/decorators.py", line 13, in wrapper
          return list(func(*args, **kwargs))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatch_gradle_version/plugins/metadata_hook/base.py", line 58, in parse_dependencies
          yield self.parse_gradle_dependency(dependency)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatch_gradle_version/plugins/metadata_hook/gradle_properties.py", line 24, in parse_gradle_dependency
          gradle_version = GradleVersion.from_properties(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/hatch_gradle_version/common/gradle.py", line 47, in from_properties
          raw_version=str(p[key].data),
                          ~^^^^^
        File "/tmp/pip-build-env-wd76f99z/overlay/lib/python3.11/site-packages/jproperties.py", line 274, in __getitem__
          raise KeyError("Key not found")
      KeyError: 'Key not found'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.
@object-Object object-Object added the enhancement New feature or request label Nov 25, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in hexdoc Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant