sustrik / ribosome

Simple code generator
248 stars 21 forks source link

Problem with Chinese unicode encoded commet in *.dna file #44

Open eeyrw opened 8 years ago

eeyrw commented 8 years ago

I use python 3.4. Generating code with the error info:

Traceback (most recent call last): File "ribosome.py", line 371, in line = dnastack[-1][0].readline() UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 285: illegal multibyte sequence

image

TAS57x7_Param_c_tpl.py.dna.txt

My *.dna file has been attached.

sustrik commented 8 years ago

I must admit I am out of my depth here. This boils down to how Python handles unicode. AFAIK this is different in Python2 and Python3. Anyway, I would try to simplify it to a minimal example (few lines of Python code) and then ask at stackoverflow to get an opinion from Python experts.

eeyrw commented 8 years ago

Thank for your reply. I change my comments to English temporarily and it works.