yuxiang-gao / PySocialForce

Extended Social Force Model in Python for social navigation research
MIT License
128 stars 36 forks source link

Fix codec error installing from source on Windows #1

Closed 0oshowero0 closed 3 years ago

0oshowero0 commented 3 years ago

Hello, I found an error when installing from source on Windows platform. It regards to the codec issue. This is the error when I perform the command. pip install -e '.[test,plot]'

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\me\PySocialForce-master\setup.py", line 6, in <module>
        README = (ROOT / "README.md").read_text()
      File "c:\programdata\anaconda3\lib\pathlib.py", line 1233, in read_text
        return f.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 6095: illegal multibyte sequence
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I fixed the issue by manually adding encoding methods when reading the file. If this is helpful, you can directly merge my version of setup.py. Hope it's helpful for you.

yuxiang-gao commented 3 years ago

Thanks for your contribution, your changes has been merged. I do not have access to a Windows machine so your help is much appreciated.