Chromium Build Failed in linux platform

We have build the chromium for linux environment, During the build(Run hooks) we have faced the below python error(TypeError: __init__() got an unexpected keyword argument ‘encoding’). Kindly support

Running hooks:  46% (54/115) Fetch Android AFDO profile            
________ running ‘python3 src/tools/download_optimization_profile.py –newest_state=src/chrome/android/profiles/newest.txt –local_state=src/chrome/android/profiles/local.txt –output_name=src/chrome/android/profiles/afdo.prof –gs_url_base=chromeos-prebuilt/afdo-job/llvm’ in ‘/home/sseng/chrom’
Traceback (most recent call last):
  File “src/tools/download_optimization_profile.py”, line 154, in <module>
    sys.exit(main())
  File “src/tools/download_optimization_profile.py”, line 148, in main
    RetrieveProfile(up_to_date_profile, new_tmpfile, args.gs_url_base)
  File “src/tools/download_optimization_profile.py”, line 100, in RetrieveProfile
    CheckCallOrExit([‘bzip2’, ‘-d’, out_path])
  File “src/tools/download_optimization_profile.py”, line 54, in CheckCallOrExit
    encoding=’utf-8′)
TypeError: __init__() got an unexpected keyword argument ‘encoding’
Error: Command ‘python3 src/tools/download_optimization_profile.py –newest_state=src/chrome/android/profiles/newest.txt –local_state=src/chrome/android/profiles/local.txt –output_name=src/chrome/android/profiles/afdo.prof –gs_url_base=chromeos-prebuilt/afdo-job/llvm’ returned non-zero exit status 1 in /home/sseng/chrom
Traceback (most recent call last):
  File “src/tools/download_optimization_profile.py”, line 154, in <module>
    sys.exit(main())
  File “src/tools/download_optimization_profile.py”, line 148, in main
    RetrieveProfile(up_to_date_profile, new_tmpfile, args.gs_url_base)
  File “src/tools/download_optimization_profile.py”, line 100, in RetrieveProfile
    CheckCallOrExit([‘bzip2’, ‘-d’, out_path])
  File “src/tools/download_optimization_profile.py”, line 54, in CheckCallOrExit
    encoding=’utf-8′)
TypeError: __init__() got an unexpected keyword argument ‘encoding’

Read more here: Source link