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

Error: "target_language = sys.argv[1]"; IndexError: list index out of range. #14

Closed
diantaowang opened this issue Nov 7, 2019 · 2 comments

Comments

@diantaowang
Copy link

Information

python version

python 3.8

System version

Ubuntu 18.04.3 LTS

What went wrong

Hi, thanks for your work! When I finished setting as your description, the GoldenDict thrown a error.

Reproducing the bug

Traceback (most recent call last):
File "googletranslate.py", line 125, in
target_language = sys.argv[1]
IndexError: list index out of range
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/init.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in
import apt
File "/usr/lib/python3/dist-packages/apt/init.py", line 23, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
File "googletranslate.py", line 125, in
target_language = sys.argv[1]
IndexError: list index out of range

@xinebf
Copy link
Owner

xinebf commented Nov 7, 2019

Command Line :

python3 /path/to/googletranslate.py zh-CN %GDWORD%

@diantaowang
Copy link
Author

Thanks! It solved my problem! ^_^

@xinebf xinebf closed this as completed Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants