Anybody getting build fails around 'json_overview_image_info.py' unexpected keyword argument 'capture_output'?

I am getting build failures based on recent master like below. I have attempted cleaning up and resetting my environment etc., but I won't be surprised if I am missing something I should be doing. Anyone know what I am missing? TIA.

Signing package index...
make[2]: Leaving directory '/home/kip/openwrt/seagate-blackarmor-220/openwrt'
export MAKEFLAGS= ;make -w -r json_overview_image_info
make[2]: Entering directory '/home/kip/openwrt/seagate-blackarmor-220/openwrt'
cd "/home/kip/openwrt/seagate-blackarmor-220/openwrt"; git log --format=%h -1 toolchain > /home/kip/openwrt/seagate-blackarmor-220/openwrt/tmp/.ver_check
cmp -s /home/kip/openwrt/seagate-blackarmor-220/openwrt/tmp/.ver_check /home/kip/openwrt/seagate-blackarmor-220/openwrt/staging_dir/toolchain-arm_xscale_gcc-8.4.0_musl_eabi/stamp/.ver_check || { \
        rm -rf /home/kip/openwrt/seagate-blackarmor-220/openwrt/build_dir/target-arm_xscale_musl_eabi /home/kip/openwrt/seagate-blackarmor-220/openwrt/staging_dir/target-arm_xscale_musl_eabi /home/kip/openwrt/seagate-blackarmor-220/openwrt/staging_dir/toolchain-arm_xscale_gcc-8.4.0_musl_eabi /home/kip/openwrt/seagate-blackarmor-220/openwrt/build_dir/toolchain-arm_xscale_gcc-8.4.0_musl_eabi; \
        mkdir -p /home/kip/openwrt/seagate-blackarmor-220/openwrt/staging_dir/toolchain-arm_xscale_gcc-8.4.0_musl_eabi/stamp; \
        mv /home/kip/openwrt/seagate-blackarmor-220/openwrt/tmp/.ver_check /home/kip/openwrt/seagate-blackarmor-220/openwrt/staging_dir/toolchain-arm_xscale_gcc-8.4.0_musl_eabi/stamp/.ver_check; \
}
WORK_DIR=/home/kip/openwrt/seagate-blackarmor-220/openwrt/build_dir/target-arm_xscale_musl_eabi/json_info_files /home/kip/openwrt/seagate-blackarmor-220/openwrt/scripts/json_overview_image_info.py /home/kip/openwrt/seagate-blackarmor-220/openwrt/bin/targets/kirkwood/generic/profiles.json
Traceback (most recent call last):
  File "/home/kip/openwrt/seagate-blackarmor-220/openwrt/scripts/json_overview_image_info.py", line 47, in <module>
    text=True,
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'
Makefile:92: recipe for target '/home/kip/openwrt/seagate-blackarmor-220/openwrt/bin/targets/kirkwood/generic/profiles.json' failed

not sure i'd assume it's your stuff... all that .json profiles stuff is relatively new ... ( and ideally it should not break a build on failure )

see what @aparcar has to say...

( in the meantime... see if you can turn it off in .config... it's got nothing to do with building working firmware )

edit: related error w-imagebuilder

  File "./scripts/json_overview_image_info.py", line 41
    f"target/linux/{output['target'].split('/')[0]}",                                       ^
SyntaxError: invalid syntax

I worked on a v2 for the architecture patch. Just moved the problematic block into the if output block.

Sorry for the trouble, I'm working on some automated tests to avoid such things in the future.

1 Like

I've apply @aparcar's fix to master commit 3b0f698760a

1 Like

Thanks all. Much appreciated!