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

IndexError in list_to_googletrans #48

Closed
kumaranjeya opened this issue Jul 31, 2019 · 5 comments
Closed

IndexError in list_to_googletrans #48

kumaranjeya opened this issue Jul 31, 2019 · 5 comments

Comments

@kumaranjeya
Copy link

kumaranjeya commented Jul 31, 2019

Translating text from "zh-cn" to "en".
Translation:   2% |##                                                                                  | ETA:   0:01:08Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\autosub.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\autosub\__init__.py", line 142, in main
    no_audio_prcs=no_audio_prcs)
  File "c:\python27\lib\site-packages\autosub\cmdline_utils.py", line 1015, in audio_or_video_prcs
    service_urls=args.service_urls
  File "c:\python27\lib\site-packages\autosub\core.py", line 306, in list_to_googletrans
    result_list[valid_index[j] - last_index])
IndexError: list index out of range
@BingLingGroup
Copy link
Owner

Need to refactor the core.py immediately.

@BingLingGroup
Copy link
Owner

Are you using the latest version 0.5.1a ?

@kumaranjeya
Copy link
Author

kumaranjeya commented Jul 31, 2019

Hi, Yes. I'm using latest version 0.5.1a.
FYI, I'm also getting similar error when tried translating Translating text from "pt" to "en".

Translating text from "pt" to "en".
Translation:   1% |#                                                                                   | ETA:   0:02:39Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\autosub.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\autosub\__init__.py", line 150, in main
    styles_list=None)
  File "c:\python27\lib\site-packages\autosub\cmdline_utils.py", line 631, in subs_trans
    service_urls=args.service_urls
  File "c:\python27\lib\site-packages\autosub\core.py", line 306, in list_to_googletrans
    result_list[valid_index[j] - last_index])
IndexError: list index out of range

@BingLingGroup
Copy link
Owner

Hi, Yes. I'm using latest version 0.5.1a.
FYI, I'm also getting similar error when tried translating Translating text from "pt" to "en".

Translating text from "pt" to "en".
Translation: 1% |# | ETA: 0:02:39Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in run_module_as_main "main", fname, loader, pkg_name) File "c:\python27\lib\runpy.py", line 72, in run_code exec code in run_globals File "C:\Python27\Scripts\autosub.exe__main.py", line 9, in File "c:\python27\lib\site-packages\autosub__init__.py", line 150, in main
styles_list=None)
File "c:\python27\lib\site-packages\autosub\cmdline_utils.py", line 631, in subs_trans
service_urls=args.service_urls
File "c:\python27\lib\site-packages\autosub\core.py", line 306, in list_to_googletrans
result_list[valid_index[j] - last_index])
IndexError: list index out of range

@kumaranjeya It's nothing to do with the language. Its just a logical bug. I will fix it in no time.

@BingLingGroup
Copy link
Owner

Hi, Yes. I'm using latest version 0.5.1a.
FYI, I'm also getting similar error when tried translating Translating text from "pt" to "en".

Translating text from "pt" to "en".
Translation:   1% |#                                                                                   | ETA:   0:02:39Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\autosub.exe\__main__.py", line 9, in <module>
  File "c:\python27\lib\site-packages\autosub\__init__.py", line 150, in main
    styles_list=None)
  File "c:\python27\lib\site-packages\autosub\cmdline_utils.py", line 631, in subs_trans
    service_urls=args.service_urls
  File "c:\python27\lib\site-packages\autosub\core.py", line 306, in list_to_googletrans
    result_list[valid_index[j] - last_index])
IndexError: list index out of range

Commit 3da6285 should fix this issue. Thanks for your feedback.

@BingLingGroup BingLingGroup changed the title Error translating text from "zh-cn" to "en". IndexError in list_to_googletrans Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants