Project

General

Profile

Bug #9644

Updated by Anchi Cheng almost 4 years ago

python 3.8.5 reading holetemplate.mrc in leginon directory 

 cd leginon 
 <pre> 
 from pyami import mrc 
 mrc.readHeaderFromFile('holetemplate.mrc') mrc.reaHeaderFromFile('holetemplate.mrc') 
 </pre> 

 <pre> 
 Traceback (most recent call last): 
   File "<stdin>", line 1, in <module> 
   File "/Users/acheng/myami/pyami/mrc.py", line 838, in readHeaderFromFile 
     h = f.read(1024) 
   File "/usr/local/opt/python@3.8/bin/../Frameworks/Python.framework/Versions/3.8/lib/python3.8/codecs.py", line 322, in decode 
     (result, consumed) = self._buffer_decode(data, self.errors, final) 
 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 0: invali 
 </pre>

Back