radareorg / radare2-r2pipe

Access radare2 via pipe from any programming language!
390 stars 99 forks source link

r2pipe.py is broken #100

Closed radare closed 5 years ago

radare commented 5 years ago

testcase

import r2pipe
r2 = r2pipe.open()
print(r2.cmd("i")) # shoul dprint a string with proper newlines, not a oneliner object

comments

<jvoisin> r2pipe.cmdj.Error: the JSON object must be str, not 'bytes' b   r2pipe isn't python3 compatible?
<jvoisin> r2.cmdj('pDj') b   where should I put the .decode? The error is happening inside r2pipe :/
Just .decode("utf-8") doesn't work in all cases
@jvoisin try to change the code inside the r2pipe to use read().decode('utf-8', errors="ignore")

IMAGE 2019-06-12 12:31:28

radare commented 5 years ago

i fixed it a while ago