DRL / blobtools

Modular command-line solution for visualisation, quality control and taxonomic partitioning of genome datasets
GNU General Public License v3.0
187 stars 44 forks source link

Python unicode encode error #76

Closed shtist closed 6 years ago

shtist commented 6 years ago

Hi! I've got these errors when execute blobtools plot using example data. FYI, os is centos 6 and python version is 2.7.0. Could you handle these problems?

[@server2 blobtools]# ./blobtools plot \

-i example/blobDB.json \ -o example/ [+] Reading BlobDB example/blobDB.json [+] Loading BlobDB into memory ... [+] Deserialising BlobDB (using 'ujson' module) (this may take a while) ... [+] Finished in 0.00179696083069s [+] Extracting data for plots ... Traceback (most recent call last): File "/Program/blobtools/lib/blobplot.py", line 183, in main() File "/Program/blobtools/lib/blobplot.py", line 146, in main plotObj.relabel_and_colour(colour_dict, user_labels) File "/Program/blobtools/lib/BtPlot.py", line 405, in relabel_and_colour colour_dict = generateColourDict(colour_groups) File "/Program/blobtools/lib/BtPlot.py", line 75, in generateColourDict colour_d = {group: rgb2hex(cmap(b)) for b, group in izip(breaks, colour_groups)} File "/Program/blobtools/lib/BtPlot.py", line 75, in colour_d = {group: rgb2hex(cmap(b)) for b, group in izip(breaks, colour_groups)} File "/usr/local/lib/python2.7/site-packages/matplotlib/colors.py", line 528, in call lut.take(xa, axis=0, mode='clip', out=rgba) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

shtist commented 6 years ago

Never mind. It was old matplotlip bug. I upgraded the package and now the problem is solved.