mentatpsi / OSGenome

An Open Source Web Application for Genetic Data (SNPs) using 23AndMe and Data Crawling Technologies
GNU General Public License v3.0
119 stars 17 forks source link

PPrint error #6

Closed mentatpsi closed 6 years ago

mentatpsi commented 6 years ago

File "DataCrawler.py", line 49, in initcrawl pp.pprint(self.rsidDict) File "C:\Python34\lib\pprint.py", line 139, in pprint self._format(object, self._stream, 0, 0, {}, 0) File "C:\Python34\lib\pprint.py", line 193, in _format allowance + 1, context, level) File "C:\Python34\lib\pprint.py", line 187, in _format allowance + 1, context, level) File "C:\Python34\lib\pprint.py", line 268, in _format write(rep) return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\xae' in position 20 : character maps to undefined

Error doesn't impact overall script performance. Prevents print of JSON output, but overall is fine.

mentatpsi commented 6 years ago

If error is encountered. No worries, run SNPApi as normal.

mentatpsi commented 6 years ago

Fixed error by removing PPrint. Other fix would be to iterate upon dictionary and encode description to UTF-8. Non critical function.