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

Fix bug in setup.py #175

Merged
merged 1 commit into from
Jul 19, 2018
Merged

Fix bug in setup.py #175

merged 1 commit into from
Jul 19, 2018

Conversation

whzup
Copy link
Collaborator

@whzup whzup commented Jul 19, 2018

Description

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.

Related Issue

Resolves #174

Motivation and Context

There might be users that cannot install the package using the setup.py file because of that.

How Has This Been Tested?

I ran the setup.py file.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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.
@ljvmiranda921
Copy link
Owner

While you’re at it, maybe we can add a Semaphore CI to test on Windows. Windows is terrible with UTF8 and some CRLF, etc. Might also be the cause of the problem

@whzup
Copy link
Collaborator Author

whzup commented Jul 19, 2018

According to the docs:

There’s another group of encodings (the so called charmap encodings) that choose a different subset of all Unicode code points and how these code points are mapped to the bytes 0x0–0xff. To see how this is done simply open e.g. encodings/cp1252.py (which is an encoding that is used primarily on Windows). There’s a string constant with 256 characters that shows you which character is mapped to which byte value.

So Python might just take cp1252 as default decoding on Windows.
BTW, it also happens when I use Python 3.6.

@ljvmiranda921
Copy link
Owner

Copy that. Let's add continuous-integration on Windows on v.0.4.0

@ljvmiranda921 ljvmiranda921 merged commit a44443d into ljvmiranda921:development Jul 19, 2018
@ljvmiranda921 ljvmiranda921 added the bug Bugs, bug fixes, etc. label Jul 19, 2018
@whzup whzup deleted the setup_fix branch July 19, 2018 17:20
@ljvmiranda921 ljvmiranda921 mentioned this pull request Aug 8, 2018
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs, bug fixes, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants