Skip to content

Conversation

@joonas-yoon
Copy link
Contributor

What does this PR do?

Related on #55

The default UTF-8 encoding of Python 3 is belong users system, and in windows, it can not be always 'utf-8' encoding.

So I fixed it always read with UTF-8 encoding.

It works fine, in my environment

$ pip install -e .
Obtaining file:///C:/Users/joona/Documents/torch-scan
  Preparing metadata (setup.py) ... done
Requirement already satisfied: torch>=1.5.0 in c:\python38\lib\site-packages (from torchscan==0.1.2.dev0+4d4fcbf) (1.11.0)
Requirement already satisfied: typing-extensions in c:\python38\lib\site-packages (from torch>=1.5.0->torchscan==0.1.2.dev0+4d4fcbf) (4.2.0)
Installing collected packages: torchscan
  Attempting uninstall: torchscan
    Found existing installation: torchscan 0.1.1
    Uninstalling torchscan-0.1.1:
      Successfully uninstalled torchscan-0.1.1
  Running setup.py develop for torchscan
Successfully installed torchscan-0.1.2.dev0+4d4fcbf

Before submitting

  • Was this discussed/approved in a Github issue or a discussion? Please add a link to it if that's the case.
  • You have read the contribution guidelines and followed them in this PR.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines.
  • Did you write any new necessary tests?

@frgfm frgfm self-requested a review May 29, 2022 16:11
@frgfm frgfm self-assigned this May 29, 2022
@frgfm frgfm added bug Something isn't working topic: build Related to project build labels May 29, 2022
@frgfm frgfm added this to the 0.1.2 milestone May 29, 2022
@frgfm frgfm linked an issue May 29, 2022 that may be closed by this pull request
Copy link
Owner

@frgfm frgfm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @joonas-yoon 🙏

One question I have: this hasn't happened to me until today. Are you using a particular version of python, pip or setuptools? 🤔

@codecov
Copy link

codecov bot commented May 29, 2022

Codecov Report

Merging #56 (ba8230b) into master (4d4fcbf) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #56   +/-   ##
=======================================
  Coverage   88.37%   88.37%           
=======================================
  Files          10       10           
  Lines         671      671           
=======================================
  Hits          593      593           
  Misses         78       78           

@joonas-yoon
Copy link
Contributor Author

python and pip version is as you can see the following:

$ pip --version
pip 22.1.1 from C:\Python38\lib\site-packages\pip (python 3.8)

you know, CI tells it have only one error but I can not understand that.

style / mypy-py3 (ubuntu-latest, 3.7) (pull_request) Failing after 55s — mypy-py3 (ubuntu-latest, 3.7)

>>> torchscan/modules/memory.py:228: error: Unsupported operand types for // ("int" and "None")  [operator]

but I did not fix it :/

@frgfm
Copy link
Owner

frgfm commented May 29, 2022

@joonas-yoon I see, so that's because of the latest pip version!

About the CI failure, don't worry, it's unrelated 👍

@frgfm frgfm merged commit b1ba598 into frgfm:master May 29, 2022
@joonas-yoon joonas-yoon deleted the fix-encoding branch April 13, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working topic: build Related to project build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pip install UnicodeDecodeError

2 participants