xinebf / google-translate-for-goldendict

Add Google translate to GoldenDict
GNU General Public License v3.0
276 stars 57 forks source link

The program has returned exit code 255. on Mac #3

Closed Ruiqi-Hu closed 6 years ago

Ruiqi-Hu commented 6 years ago

Hi, Thanks for the beautiful work. However, it does not work on my Mac. I have python3 installed and set "python3 /Users/myname/Data/Dicts/google-translate-for-goldendict-master/googletranslate.py zh-CN %GDWORD%" in the GoldenDict. The error occurred with Query error: The program has returned exit code 255.

I am asking because I noticed that you have set #!/usr/bin/env python3 in the script, which should lead to the python3 as the interpreter to run the code.

Thanks in advance.

xinebf commented 6 years ago

Can you run it in the terminal, for example:

Python3 ./googletranslate.py zh-CN "hello"
Ruiqi-Hu commented 6 years ago

Yes, it works perfectly in the terminal. However, it just does not work in the Dict.

xinebf commented 6 years ago

Sorry, I don't know what caused the exit error 255.

xinebf commented 6 years ago

By searching exit error 255 there is a reason: If you made error in path to Python executable, you may don't see any error or may see this

Ruiqi-Hu commented 6 years ago

Problem solved. It was because of the conflict in my development environment. Thanks a lot for the help.

ghost commented 4 years ago

Problem solved. It was because of the conflict in my development environment. Thanks a lot for the help.

Hi, how do you solved it, I have a same problem on ubuntu.

MikasaLee commented 3 years ago

Problem solved. It was because of the conflict in my development environment. Thanks a lot for the help.

Hi, how do you solved it, I have a same problem on ubuntu.

me too,but I resolved it。 It was also because of the conflict in my development environment. my python path : ~/anaconda3/bin/python so the command line is: ~/anaconda3/bin/python -m googletranslate zh-CN %GDWORD% -s "translate.google.cn"