Edinburgh-Genome-Foundry / DnaFeaturesViewer

:eye: Python library to plot DNA sequence features (e.g. from Genbank files)
https://edinburgh-genome-foundry.github.io/DnaFeaturesViewer/
MIT License
584 stars 90 forks source link

no encoding declared in GraphicRecord.py #49

Closed tniapp closed 2 years ago

tniapp commented 3 years ago
>>import dna_features_viewer

  File "~/libs/anaconda2/envs/py3/lib/python3.7/site-packages/dna_features_viewer/GraphicRecord/GraphicRecord.py", line 206
    label = label[: max_label_length - 1] + "…"
                                               ^
SyntaxError: Non-ASCII character '\xe2' in file ~libs/anaconda2/envs/py3/lib/python3.7/site-packages/dna_features_viewer/GraphicRecord/GraphicRecord.py on line 206, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
veghp commented 3 years ago

Thanks for reporting this. What operating system are you using? The package was developed on Linux (Ubuntu) on Python 3.6.7 in an English locale. At the moment I cannot reproduce the error, but I'll try and address this.

My suggested solution in the meantime, following this Q&A, is to open the file and add this to the top:

# coding: utf-8