felixonmars / ydcv

YouDao Console Version - Simple wrapper for Youdao online translate (Chinese <-> English) service API, as an alternative to the StarDict Console Version(sdcv).
GNU General Public License v3.0
506 stars 91 forks source link

ydcv 0.6 fails to run on macOS Python 2.7.10 #46

Closed fxcoudert closed 5 years ago

fxcoudert commented 5 years ago

Running ydcv 0.6 on macOS (all versions from 10.12 to 10.14) with the system Python (Python 2.7.10 (default, Aug 17 2018, 19:45:58)) gives the following error:

==> /usr/local/Cellar/ydcv/0.6/bin/ydcv 你好
  File "/usr/local/Cellar/ydcv/0.6/bin/ydcv", line 117
SyntaxError: Non-ASCII character '\xe6' in file /usr/local/Cellar/ydcv/0.6/bin/ydcv on line 117, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Error: ydcv: failed

The error can be reproduced with Python 2.7.15 from Homebrew. The script works, however, with Python 3.7.2.

fxcoudert commented 5 years ago
felixonmars commented 5 years ago

Should be fixed in 0.6.1.

boypt commented 5 years ago

@felixonmars recent changes made to current branch is both functional and fundamental (api changes ), and 0.6 actually not working at all at the moment.

I think the version should at lease bump to 0.7

felixonmars commented 5 years ago

@pentie It was bumped to 0.6 for the api changes, and 0.6.1 only covers the utf8 line.