Entering edit mode
3.3 years ago
Paula
•
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
This is usually a LOCALE issue in your terminal. Take a look at a guide like: https://webkul.com/blog/setup-locale-python3/
Already answered here