Error when opening CEL files in python

Error when opening CEL files in python

0

Hi! I am trying to open a CEL file using:

with open("pathtofile/file.CEL", "r") as handle:
  c = CelFile.read(handle)

and it is returning the error:

---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-24-1a8e8da51c49> in <module>()
      1 with open("/content/drive/MyDrive/explore genomics/MB-7138.CEL", "r") as handle:
----> 2   c = CelFile.read(handle)

1 frames
/usr/lib/python3.7/codecs.py in decode(self, input, final)
    320         # decode input (taking the buffer into account)
    321         data = self.buffer + input
--> 322         (result, consumed) = self._buffer_decode(data, self.errors, final)
    323         # keep undecoded input until the next call
    324         self.buffer = data[consumed:]

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 426: invalid continuation byte

Has anybody encountered this before? Thanks


python

• 24 views

updated 1 hour ago by

19k

written 2 hours ago by

0

Read more here: Source link