0

I'm executing a command in python using:

command = os.popen("sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m").read()

I'm trying to create a bootable USB device with diskutil but I'm getting this error and I don't know how to fix it

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 4: invalid start byte

EDIT

I solved by myself using subprocess event:

subprocess.check_output("command","to","execute"]).decode(errors='ignore')
Programmer
  • 103
  • 1
  • 9
  • Did you try putting the error through a Google search? What did you find? – roganjosh Nov 01 '18 at 19:02
  • I found this https://stackoverflow.com/questions/22216076/unicodedecodeerror-utf8-codec-cant-decode-byte-0xa5-in-position-0-invalid-s but I was not able to solve anyway – Programmer Nov 01 '18 at 19:04

0 Answers0