Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py does throws a UnicodeDecodeError #174

Closed
whzup opened this issue Jul 19, 2018 · 1 comment
Closed

setup.py does throws a UnicodeDecodeError #174

whzup opened this issue Jul 19, 2018 · 1 comment

Comments

@whzup
Copy link
Collaborator

whzup commented Jul 19, 2018

Describe the bug
The setup.py file throws a UnicodeDecodeError:

Traceback (most recent call last):
  File "setup.py", line 9, in <module>
    readme = readme_file.read()
  File "Python\Python37-32\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 11427: character maps to <undefined>

To Reproduce
Run the setup.py file to install pyswarms:

python setup.py install

Expected behaviour
No UnicodeDecodeError 😄.

Environment (please complete the following information):

  • OS: Windows
  • PySwarms Version v0.2.1
  • Python Version 3.7.0

Additional context
Not a big deal there is a StackOverflow question with the solution to this problem. PR is coming.

@whzup whzup mentioned this issue Jul 19, 2018
9 tasks
@ljvmiranda921
Copy link
Owner

ljvmiranda921 commented Jul 19, 2018

PySwarms hasn’t been tested in Python 3.7. Can you try setting up a virtualenv for 3.4, 3.5, and 3.6? That should work because our tests are passing and travis performs the steps you did above.

Let’s do 3.7 on 0.4.0 :) No need to rush

ljvmiranda921 pushed a commit that referenced this issue Jul 19, 2018
Resolves #174

Fixed a bug in the setup.py file where it would throw an error because the encoding format was not right. This is done by adding the encoding parameter to the open() function.

Signed-off-by: Lester James V. Miranda <[email protected]>
Committed-with: Aaron (@whzup )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants