akamhy / videohash

Near Duplicate Video Detection (Perceptual Video Hashing) - Get a 64-bit comparable hash-value for any video.
https://pypi.org/project/videohash
MIT License
264 stars 41 forks source link

Fix installing on Windows by specifying encoding #83

Closed step21 closed 2 years ago

step21 commented 2 years ago

In a windows environment, if the encoding is not specified, ASCII is expected. This creates errors when running setup.py when the README (or other files) contain emojis or other non-ascii characters. This fixes this at least for the README, not sure if there are other instances of this.

akamhy commented 2 years ago

Thanks, I will add a build test to the CI.

codecov[bot] commented 2 years ago

Codecov Report

Merging #83 (8a82381) into main (e0d2d8e) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #83   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files           9        9           
  Lines         346      346           
=======================================
  Hits          343      343           
  Misses          3        3           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e0d2d8e...8a82381. Read the comment docs.

akamhy commented 2 years ago

For future reference

Traceback (most recent call last):
  File "D:\a\videohash\videohash\setup.py", line 5, in <module>
    long_description = f.read()
  File "C:\hostedtoolcache\windows\Python\3.9.9\x64\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 0x90 in position 196[8](https://github.com/akamhy/videohash/runs/5096340174?check_suite_focus=true#step:5:8): character maps to <undefined>
Error: Process completed with exit code 1.