SMTG-Bham / doped

doped is a Python software for the generation, pre-/post-processing and analysis of defect supercell calculations, implementing the defect simulation workflow in an efficient, reproducible, user-friendly yet powerful and fully-customisable manner.
https://doped.readthedocs.io
MIT License
129 stars 31 forks source link

UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 583: illegal multibyte sequence #85

Closed LiangzhengChou closed 2 months ago

LiangzhengChou commented 2 months ago

image I just installed the doped library and got this error. How can I solve it? from doped.generation import DefectsGenerator works fine.

kavanase commented 2 months ago

Hi @LiangzhengChou, this is an odd issue that seems to be caused by the use of an em dash ("–") in one of the yaml files. I've now updated to avoid this in the develop branch, so this update will be included in the next release of doped. For now, you can install this version of doped using: pip install https://github.com/SMTG-Bham/doped/archive/develop.zip. Can you please try this and report back?

I see you are running on a Windows system. We have limited support for Windows as this causes a lot of formatting issues within the code, and this is what caused the error here. With this update it should fix this specific issue, but I'm not sure if you will encounter further issues due to the Windows subsystem... If at all possible, we would recommend running on Linux or MacOS

LiangzhengChou commented 2 months ago

image Thank you very much for your answer. I tried to install doped using pip install https://github.com/SMTG-Bham/doped/archive/develop.zip, but the same problem still occurred. I will follow your advice to install and use doped in Linux environment.

kavanase commented 2 months ago

Hmm that's odd, it should definitely have avoided that error at least. Could you try uninstalling doped (with pip uninstall doped, conda uninstall doped) and then installing again with pip install https://github.com/SMTG-Bham/doped/archive/develop.zip? But yes either way, running on Linux or Mac should avoid this issue!

LiangzhengChou commented 2 months ago

Oh indeed, your suggestion solved the problem, thank you very much!