UnicodeDecodeError reading binary input

后端 未结 1 662
太阳男子
太阳男子 2021-01-21 11:46

I try to port my code from python 2.7 to 3.4. Under 2.7 it works quite well. I will import a Picoscope binary file and get the following error under Python 3.4 (ubuntu):

相关标签:
1条回答
  • 2021-01-21 12:02

    You need to read the files in binary mode:

    bin_file_A = open(infile_A, "rb")
    bin_file_B = open(infile_B, "rb")
    
    0 讨论(0)
提交回复
热议问题