Closed KwatMDPhD closed 7 years ago
Hi, Thanks for a report. I am taking a look into it. I see you are using python 3.6 and the library was tested only for python 3.5. Maybe this is an issue.
I see. Thank you for the support. One of my favorite libraries.
Check out this commit: 8cf68cf19de50e0c8045cce0a311e813430ac4a5. It should work now.
If you would like to use it you have to pull newest master.
smart_open(...) is a nice solution. Thank you
GSE14755 File already exist: using local version. Parsing ../data/geo/GSE14755_family.soft.gz:
PLATFORM : GPL5345
UnicodeDecodeError Traceback (most recent call last)
/home/k/Jumis/gist/tools/GEOparse/GEOparse/GEOparse.py in get_GEO(geo, filepath, destdir, how, annotate_gpl, geotype, include_data, silent) 64 return parse_GSM(filepath) 65 elif geotype.upper() == "GSE": ---> 66 return parse_GSE(filepath) 67 elif geotype.upper() == 'GPL': 68 return parse_GPL(filepath, silent=silent)
/home/k/Jumis/gist/tools/GEOparse/GEOparse/GEOparse.py in parse_GSE(filepath) 506 elif entry_type == "PLATFORM": 507 is_data, data_group = next(groupper) --> 508 gpls[entry_name] = parse_GPL(data_group, entry_name) 509 elif entry_type == "DATABASE": 510 is_data, data_group = next(groupper)
/home/k/Jumis/gist/tools/GEOparse/GEOparse/GEOparse.py in parse_GPL(filepath, entry_name, silent) 383 gpl_soft.append(line) 384 else: --> 385 for line in filepath: 386 if "_table_begin" in line or (line[0] not in ("^", "!", "#")): 387 has_table = True
/home/k/Jumis/tools/anaconda/lib/python3.6/codecs.py in decode(self, input, final) 319 # decode input (taking the buffer into account) 320 data = self.buffer + input --> 321 (result, consumed) = self._buffer_decode(data, self.errors, final) 322 # keep undecoded input until the next call 323 self.buffer = data[consumed:]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc9 in position 5280: invalid continuation byte
GSE5336 File already exist: using local version. Parsing ../data/geo/GSE5336_family.soft.gz:
SAMPLE : GSM120869
UnicodeDecodeError Traceback (most recent call last)
/home/k/Jumis/gist/tools/GEOparse/GEOparse/GEOparse.py in get_GEO(geo, filepath, destdir, how, annotate_gpl, geotype, include_data, silent) 64 return parse_GSM(filepath) 65 elif geotype.upper() == "GSE": ---> 66 return parse_GSE(filepath) 67 elif geotype.upper() == 'GPL': 68 return parse_GPL(filepath, silent=silent)
/home/k/Jumis/gist/tools/GEOparse/GEOparse/GEOparse.py in parse_GSE(filepath) 503 elif entry_type == "SAMPLE": 504 is_data, data_group = next(groupper) --> 505 gsms[entry_name] = parse_GSM(data_group, entry_name) 506 elif entry_type == "PLATFORM": 507 is_data, data_group = next(groupper)
/home/k/Jumis/gist/tools/GEOparse/GEOparse/GEOparse.py in parse_GSM(filepath, entry_name) 303 soft = [] 304 has_table = False --> 305 for line in filepath: 306 if "_table_begin" in line or (line[0] not in ("^", "!", "#")): 307 has_table = True
/home/k/Jumis/tools/anaconda/lib/python3.6/codecs.py in decode(self, input, final) 319 # decode input (taking the buffer into account) 320 data = self.buffer + input --> 321 (result, consumed) = self._buffer_decode(data, self.errors, final) 322 # keep undecoded input until the next call 323 self.buffer = data[consumed:]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb5 in position 2897: invalid start byte
Thanks