Skip to content

Tests fail: ValueError: PyCapsule_GetName called with invalid PyCapsule object #235

@yurivict

Description

@yurivict
Test session starts (platform: freebsd15, Python 3.11.15, pytest 8.4.2, pytest-sugar 1.1.1)
cachedir: .pytest_cache
Using --randomly-seed=1878678715
benchmark: 5.1.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Matplotlib: 3.10.8
Freetype: 2.14.3
installed packages of interest: boost-histogram==1.5.0 dependency-groups==1.3.1 fastjsonschema==2.21.2 furo==2025.12.19 hist==2.9.2 myst-parser==5.0.0 numpy==1.26.4 packaging==26.0 pip==23.3.2 pytest==8.4.2 sphinx==5.3.0 sphinx-copybutton==0.5.2 typing_extensions==4.15.0 uhi==1.1.1
rootdir: /usr/ports/misc/py-uhi/work-py311/uhi-1.1.1
configfile: pyproject.toml
testpaths: tests
plugins: flake8-1.1.1, randomly-3.12.0, time-machine-2.13.0, asyncio-1.3.0, timeout-2.4.0, mock-3.10.0, subprocess-1.5.2, xdist-3.6.1, instafail-0.5.0, typeguard-4.5.1, benchmark-5.1.0, forked-1.6.0, mpl-0.17.0, services-2.2.2, anyio-4.12.1, flaky-3.8.1, pytest_freezer-0.4.9, mypy-1.0.1, ruff-0.5, aspectlib-2.0.0, cov-5.0.0, sugar-1.1.1, env-0.6.2, rerunfailures-11.1.2
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collecting ... 
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ERROR collecting tests/test_testing.py ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
tests/test_testing.py:3: in <module>
    import boost_histogram as bh
/usr/local/lib/python3.11/site-packages/boost_histogram/__init__.py:3: in <module>
    from . import accumulators, axis, numpy, storage
/usr/local/lib/python3.11/site-packages/boost_histogram/axis/__init__.py:14: in <module>
    from . import transform
/usr/local/lib/python3.11/site-packages/boost_histogram/axis/transform.py:12: in <module>
    sqrt = Function("_sqrt_fn", "_sq_fn", convert=_internal_conversion, name="sqrt")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/lib/python3.11/site-packages/boost_histogram/_internal/axis_transform.py:142: in __init__
    self._this = cpp_class(forward, inverse, convert, name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   ValueError: PyCapsule_GetName called with invalid PyCapsule object
collected 67 items / 1 error / 2 skipped                                                                                                                                                               

======================================================================================= short test summary info ========================================================================================
SKIPPED [1] tests/test_hdf5.py:15: h5py is not installed
SKIPPED [1] tests/test_root.py:9: could not import 'ROOT': No module named 'ROOT'

Version: 1.1.1
Python-3.11
FreeBSD 15 STABLE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions