#1141009 python-jq: FTBFS: E ValueError: Cannot index number with string ("x")

#1141009#5
Date:
2026-06-28 20:52:10 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202606/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-jq, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with python3 --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --with python3 --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
   dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:142: Building wheel for python3.13 with "build" module
I: pybuild base:385: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_jq
* Building wheel...
running bdist_wheel
running build
running build_ext
warning: jq.pyx:185:35: noexcept clause is ignored for function returning Python object
Compiling jq.pyx because it changed.
[1/1] Cythonizing jq.pyx
building 'jq' extension
creating build/temp.linux-x86_64-cpython-313
x86_64-linux-gnu-gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.13 -c jq.c -o build/temp.linux-x86_64-cpython-313/jq.o
jq.c: In function ‘__pyx_f_2jq_jv_string_to_py_string’:
jq.c:11534:24: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
11534 |   __pyx_v_string_value = jv_string_value(__pyx_v_value);
      |                        ^
creating build/lib.linux-x86_64-cpython-313
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -Wl,-z,now -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-cpython-313/jq.o -L/usr/lib/x86_64-linux-gnu -ljq -lonig -o build/lib.linux-x86_64-cpython-313/jq.cpython-313-x86_64-linux-gnu.so
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
copying build/lib.linux-x86_64-cpython-313/jq.cpython-313-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/.
running install_egg_info
running egg_info
creating jq.egg-info
writing jq.egg-info/PKG-INFO
writing dependency_links to jq.egg-info/dependency_links.txt
writing top-level names to jq.egg-info/top_level.txt
writing manifest file 'jq.egg-info/SOURCES.txt'
reading manifest file 'jq.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'deps/*.tar.gz'
adding license file 'LICENSE'
writing manifest file 'jq.egg-info/SOURCES.txt'
Copying jq.egg-info to build/bdist.linux-x86_64/wheel/./jq-1.11.0.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/jq-1.11.0.dist-info/WHEEL
creating '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_jq/.tmp-i8vbdrw2/jq-1.11.0-cp313-cp313-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'jq.cpython-313-x86_64-linux-gnu.so'
adding 'jq-1.11.0.dist-info/licenses/LICENSE'
adding 'jq-1.11.0.dist-info/METADATA'
adding 'jq-1.11.0.dist-info/WHEEL'
adding 'jq-1.11.0.dist-info/top_level.txt'
adding 'jq-1.11.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built jq-1.11.0-cp313-cp313-linux_x86_64.whl
I: pybuild plugin_pyproject:168: Unpacking wheel built for python3.13 with "installer" module
I: pybuild plugin_pyproject:142: Building wheel for python3.14 with "build" module
I: pybuild base:385: python3.14 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_jq
* Building wheel...
running bdist_wheel
running build
running build_ext
building 'jq' extension
creating build/temp.linux-x86_64-cpython-314
x86_64-linux-gnu-gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.14 -c jq.c -o build/temp.linux-x86_64-cpython-314/jq.o
jq.c: In function ‘__pyx_f_2jq_jv_string_to_py_string’:
jq.c:11534:24: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
11534 |   __pyx_v_string_value = jv_string_value(__pyx_v_value);
      |                        ^
creating build/lib.linux-x86_64-cpython-314
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -Wl,-z,now -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-cpython-314/jq.o -L/usr/lib/x86_64-linux-gnu -ljq -lonig -o build/lib.linux-x86_64-cpython-314/jq.cpython-314-x86_64-linux-gnu.so
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
copying build/lib.linux-x86_64-cpython-314/jq.cpython-314-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/.
running install_egg_info
running egg_info
writing jq.egg-info/PKG-INFO
writing dependency_links to jq.egg-info/dependency_links.txt
writing top-level names to jq.egg-info/top_level.txt
reading manifest file 'jq.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'deps/*.tar.gz'
adding license file 'LICENSE'
writing manifest file 'jq.egg-info/SOURCES.txt'
Copying jq.egg-info to build/bdist.linux-x86_64/wheel/./jq-1.11.0.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/jq-1.11.0.dist-info/WHEEL
creating '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_jq/.tmp-sgaf3dn2/jq-1.11.0-cp314-cp314-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'jq.cpython-314-x86_64-linux-gnu.so'
adding 'jq-1.11.0.dist-info/licenses/LICENSE'
adding 'jq-1.11.0.dist-info/METADATA'
adding 'jq-1.11.0.dist-info/WHEEL'
adding 'jq-1.11.0.dist-info/top_level.txt'
adding 'jq-1.11.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built jq-1.11.0-cp314-cp314-linux_x86_64.whl
I: pybuild plugin_pyproject:168: Unpacking wheel built for python3.14 with "installer" module
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:385: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_jq/build; python3.13 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.13.14, pytest-9.1.1, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_jq/build
configfile: tox.ini
plugins: typeguard-4.4.4
collected 66 items

tests/jq_old_tests.py ..........F....                                    [ 22%]
tests/jq_tests.py .......................F...........................    [100%]

=================================== FAILURES ===================================
______ test_value_error_is_raised_if_input_cannot_be_processed_by_program ______

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq(".x")
        try:

tests/jq_old_tests.py:95:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:299: in jq._Program.transform
    ???
jq.pyx:329: in jq._ProgramWithInput.first
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:373: ValueError

During handling of the above exception, another exception occurred:

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq(".x")
        try:
            program.transform(1)
            assert False, "Expected error"
        except ValueError as error:
            expected_error_str = "Cannot index number with string \"x\""

tests/jq_old_tests.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

expected = 'Cannot index number with string ("x")'
actual = 'Cannot index number with string "x"'

    def assert_equal(expected, actual):
               ^^^^^^^^^^^^^^^^^^
E       AssertionError

tests/tools.py:2: AssertionError
______ test_value_error_is_raised_if_input_cannot_be_processed_by_program ______

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq.compile(".x")
        try:

tests/jq_tests.py:215:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:326: in jq._ProgramWithInput.all
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:373: ValueError

During handling of the above exception, another exception occurred:

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq.compile(".x")
        try:
            program.input(1).all()
            assert False, "Expected error"
        except ValueError as error:
            expected_error_str = "Cannot index number with string \"x\""

tests/jq_tests.py:219:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

expected = 'Cannot index number with string ("x")'
actual = 'Cannot index number with string "x"'

    def assert_equal(expected, actual):
               ^^^^^^^^^^^^^^^^^^
E       AssertionError

tests/tools.py:2: AssertionError
=========================== short test summary info ============================
FAILED tests/jq_old_tests.py::test_value_error_is_raised_if_input_cannot_be_processed_by_program
FAILED tests/jq_tests.py::test_value_error_is_raised_if_input_cannot_be_processed_by_program
========================= 2 failed, 64 passed in 0.11s =========================
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_jq/build; python3.13 -m pytest tests
I: pybuild base:385: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_jq/build; python3.14 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.14.6, pytest-9.1.1, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_jq/build
configfile: tox.ini
plugins: typeguard-4.4.4
collected 66 items

tests/jq_old_tests.py ..........F....                                    [ 22%]
tests/jq_tests.py .......................F...........................    [100%]

=================================== FAILURES ===================================
______ test_value_error_is_raised_if_input_cannot_be_processed_by_program ______

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq(".x")
        try:

tests/jq_old_tests.py:95:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:299: in jq._Program.transform
    ???
jq.pyx:329: in jq._ProgramWithInput.first
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:373: ValueError

During handling of the above exception, another exception occurred:

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq(".x")
        try:
            program.transform(1)
            assert False, "Expected error"
        except ValueError as error:
            expected_error_str = "Cannot index number with string \"x\""

tests/jq_old_tests.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

expected = 'Cannot index number with string ("x")'
actual = 'Cannot index number with string "x"'

    def assert_equal(expected, actual):
               ^^^^^^^^^^^^^^^^^^
E       AssertionError

tests/tools.py:2: AssertionError
______ test_value_error_is_raised_if_input_cannot_be_processed_by_program ______

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq.compile(".x")
        try:

tests/jq_tests.py:215:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:326: in jq._ProgramWithInput.all
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jq.pyx:373: ValueError

During handling of the above exception, another exception occurred:

    def test_value_error_is_raised_if_input_cannot_be_processed_by_program():
        program = jq.compile(".x")
        try:
            program.input(1).all()
            assert False, "Expected error"
        except ValueError as error:
            expected_error_str = "Cannot index number with string \"x\""

tests/jq_tests.py:219:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

expected = 'Cannot index number with string ("x")'
actual = 'Cannot index number with string "x"'

    def assert_equal(expected, actual):
               ^^^^^^^^^^^^^^^^^^
E       AssertionError

tests/tools.py:2: AssertionError
=========================== short test summary info ============================
FAILED tests/jq_old_tests.py::test_value_error_is_raised_if_input_cannot_be_processed_by_program
FAILED tests/jq_tests.py::test_value_error_is_raised_if_input_cannot_be_processed_by_program
========================= 2 failed, 64 passed in 0.11s =========================
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_jq/build; python3.14 -m pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.14" --parallel=2 returned exit code 13
make: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------