TypeError: argument of type 'WindowsPath' is not iterable
Command : python3 apk-rebuild.py tttt.apk
File "C:\Users\ddddddd\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 524, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable
Hey!
@minanagehsalalma can you post the entire console output?
Plus try to update Python to version 3.9 or above.
@ilya-kozyr it took a lot of time to load and i deleted all the files sorry :9
The test was done on The Reddit APP apk since it has ssl pinning like the rest of the social apps
Hi, same error on windows 11
Traceback (most recent call last):
File "apk-rebuild.py", line 485, in <module>
main()
File "apk-rebuild.py", line 393, in main
rebuild_single_apk(source_file.full_path, output_files.full_path)
File "apk-rebuild.py", line 227, in rebuild_single_apk
subprocess.run(command, stdout=sys.stdout, stderr=sys.stderr)
File "C:\Users\alfa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 453, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\alfa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\Users\alfa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1100, in _execute_child
args = list2cmdline(args)
File "C:\Users\alfa\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 511, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable
this is happened because in command arrays we have to cast WindowsPath to string.
For example.
['java', '-jar', WindowsPath('C:/Users/alfa/AppData/Roaming/apk-rebuild/apktool_2.6.1.jar'), 'decode', WindowsPath('C:/Users/alfa/Desktop/android-ssl-pinning-bypass-master/target.apk'), '--output', WindowsPath('C:/Users/alfa/Desktop/android-ssl-pinning-bypass-master/target.apk-decompiled')]
Hey! @cturan what python version are you using? the script works for me on Windows 10 and python 3.10.6.
Hey! @cturan what python version are you using? the script works for me on Windows 10 and python 3.10.6.
I have multiple version installed on my system but look like script started by python 3.7.0
This might be the issue. Anyway, I pushed changes with converting path object to string. Try.
This might be the issue. Anyway, I pushed changes with converting path object to string. Try.
The latest version works just fine, thanks.