question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hatch crashes if plugin namespace has dots in entry points

See original GitHub issue

In my pyproject.toml I have the following entry point:

[project.entry-points.iqe.click_commands]
requirements-report = "iqe_requirements.cli:requirements"

When I do hatch build, hatch crashes with the traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/tmpxtz_mwbc/Xc48/lib/python3.8/site-packages/hatchling/__main__.py", line 6, in <module>
    sys.exit(hatchling())
  File "/tmp/tmpxtz_mwbc/Xc48/lib/python3.8/site-packages/hatchling/cli/__init__.py", line 26, in hatchling
    command(**kwargs)
  File "/tmp/tmpxtz_mwbc/Xc48/lib/python3.8/site-packages/hatchling/cli/build/__init__.py", line 64, in build_impl
    for artifact in builder.build(
  File "/tmp/tmpxtz_mwbc/Xc48/lib/python3.8/site-packages/hatchling/builders/plugin/interface.py", line 77, in build
    self.metadata.core.validate_fields()
  File "/tmp/tmpxtz_mwbc/Xc48/lib/python3.8/site-packages/hatchling/metadata/core.py", line 1119, in validate_fields
    getattr(self, attribute)
  File "/tmp/tmpxtz_mwbc/Xc48/lib/python3.8/site-packages/hatchling/metadata/core.py", line 955, in entry_points
    raise TypeError(
TypeError: Object reference `click_commands` of field `project.entry-points.iqe` must be a string

Looks like hatch doesn’t expect a string with dots in plugin-namespace .

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
RonnyPfannschmidtcommented, May 4, 2022

is this a “under-spec” issue, in PEP-621

as far as i understood it may be necessary to make the key [project.entry-points."iqe.click_commands"]

1reaction
ofekcommented, May 4, 2022

I’ll fix, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

crash when calling functions from plugins that have dots ...
I use a plugin whose name has dots inside. The program that uses this plugin crashes when a function from the plugin is...
Read more >
Crash or freeze while using the HATCH command in AutoCAD
When using the HATCH command in AutoCAD, the program crashes or freezes right away or while previewing the hatch.
Read more >
Build an esbuild plugin - Learn With Jason
Chance Strickland will teach us how to extend esbuild with custom plugins in this episode. ... Build function takes care, you've got an...
Read more >
Changelog - QCAD
If unchecked: always render points as dots or with chosen point mode (cross, etc.) and thin lines; Add preference "Maximum selected entities ...
Read more >
Change log for 4.8.43
... Bug 1868755: vsphereprivate: tf plugin to no longer error if no network ... Bug 2053223: Fix mirroring images that have dots in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found