OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by zhanhb - 02.07.2020
Last edited by Petr Štetiar - 14.07.2020

FS#3212 - fail to generate json overview image info with python3.6

With commit 263f7e5bbd119ebed1f514c16f659a2e2a2b132c, fail to generate json overview image info with python3.6.

$ python3 --version
Python 3.6.8
$ make V=sc -r json_overview_image_info
make[1]: Entering directory `/firmware'
cd "/firmware"; git log --format=%h -1 toolchain > /firmware/tmp/.ver_check
cmp -s /firmware/tmp/.ver_check /firmware/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/stamp/.ver_check || { \
	rm -rf /firmware/build_dir/target-mips_24kc_musl /firmware/staging_dir/target-mips_24kc_musl /firmware/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl /firmware/build_dir/toolchain-mips_24kc_gcc-8.4.0_musl; \
	mkdir -p /firmware/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/stamp; \
	mv /firmware/tmp/.ver_check /firmware/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/stamp/.ver_check; \
WORK_DIR=/firmware/build_dir/target-mips_24kc_musl/json_info_files /firmware/scripts/ /firmware/bin/targets/ath79/nand/profiles.json 
Traceback (most recent call last):
  File "/firmware/scripts/", line 47, in <module>
  File "/usr/lib64/python3.6/", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'
make[1]: *** [/firmware/bin/targets/ath79/nand/profiles.json] Error 1
make[1]: Leaving directory `/firmware'
make: *** [json_overview_image_info] Error 2

Work as expected with 3.6, not sure if this patch is working with other versions.

diff --git a/scripts/ b/scripts/
index 59d69df314..3dd8c9c353 100755
--- a/scripts/
+++ b/scripts/
@@ -2,7 +2,7 @@
 from os import getenv, environ
 from pathlib import Path
-from subprocess import run
+from subprocess import run, PIPE
 from sys import argv
 import json
@@ -41,10 +41,10 @@ output["default_packages"] = run(
-    capture_output=True,
+    stdout=PIPE, stderr=PIPE,
     env=environ.copy().update({"TOPDIR": Path().cwd()}),
-    text=True,
+    universal_newlines=True,
 if output:
Closed by  Petr ┼átetiar
14.07.2020 09:11
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in 7a3e56a227d16edd

Rod Egan commented on 12.07.2020 09:54

This might be associated with  FS#3227 


Available keyboard shortcuts


Task Details

Task Editing