Skip to content

idsprint regression when selecting leaf indices #43

Description

@olivhoenen

Works with IDStools/2.4.1:

$ idsprint -u imas:hdf5?path=/work/imas/shared/imasdb/ITER/3/134173/106#equilibrium/time[100]
17:03:48 INFO     Parsing data dictionary version 3.38.1 @dd_zip.py:89
91.93759781205512

but not anymore with develop (and release candidate for 2.5):

idsprint -u imas:hdf5?path=/work/imas/shared/imasdb/ITER/3/134173/106#equilibrium/time[100]
17:04:58 INFO     Parsing data dictionary version 3.38.1 @dd_zip.py:89
Traceback (most recent call last):
  File "/home/ITER/hoeneno/GIT/IDStools/venv-mpl/bin/idsprint", line 8, in <module>
    sys.exit(idsprint())
             ~~~~~~~~^^
  File "/home/ITER/hoeneno/GIT/IDStools/idstools/scripts/__init__.py", line 59, in idsprint
    _load_script_main("idsprint")()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/ITER/hoeneno/GIT/IDStools/idstools/scripts/__init__.py", line 39, in main
    exec(script_code, namespace)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 779, in <module>
  File "<string>", line 288, in print_tree
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/console.py", line 1724, in print
    extend(render(renderable, render_options))
    ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/console.py", line 1345, in render
    for render_output in iter_render:
                         ^^^^^^^^^^^
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/panel.py", line 229, in __rich_console__
    lines = console.render_lines(renderable, child_options, style=style)
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/console.py", line 1385, in render_lines
    lines = list(
        islice(
    ...<9 lines>...
        )
    )
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/segment.py", line 305, in split_and_crop_lines
    for segment in segments:
                   ^^^^^^^^
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/console.py", line 1345, in render
    for render_output in iter_render:
                         ^^^^^^^^^^^
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/padding.py", line 97, in __rich_console__
    lines = console.render_lines(
        self.renderable, render_options, style=style, pad=True
    )
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/console.py", line 1385, in render_lines
    lines = list(
        islice(
    ...<9 lines>...
        )
    )
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/segment.py", line 305, in split_and_crop_lines
    for segment in segments:
                   ^^^^^^^^
  File "/work/imas/opt/EasyBuild/software/Python-bundle-PyPI/2025.07-GCCcore-14.3.0/lib/python3.13/site-packages/rich/console.py", line 1332, in render
    raise errors.NotRenderableError(
    ...<2 lines>...
    )
rich.errors.NotRenderableError: Unable to render np.float64(91.93759781205512); A str, Segment or object with __rich_console__ method is required

I guess this may be related to PR #28 and was missed during the review.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions