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

Automatic translation returns Index out of range Error #10904

Closed
2 tasks done
gzor opened this issue Jan 30, 2024 · 2 comments
Closed
2 tasks done

Automatic translation returns Index out of range Error #10904

gzor opened this issue Jan 30, 2024 · 2 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@gzor
Copy link

gzor commented Jan 30, 2024

Describe the issue

On automatic translation i don't get suggestions, but the server error:
Automatische Übersetzung fehlgeschlagen: IndexError: list index out of range
In english:
Automatic translation failed: IndexError: list index out of range

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. Add OpenAi as Machine translation.
  2. Go to your component, the language to translate and select Tools => Automatic Translation
  3. Configure it to make suggestions, and use OpenAI as Machine translation

Expected behavior

Recieve Suggestions

Screenshots

No response

Exception traceback

celery-translate stderr | [2024-01-30 15:07:37,599: INFO/ForkPoolWorker-1] HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
celery-translate stderr | [2024-01-30 15:07:37,605: WARNING/476] Machinery error: IndexError: list index out of range
celery-translate stderr | [2024-01-30 15:07:37,605: WARNING/ForkPoolWorker-1] Machinery error: IndexError: list index out of range
2024-01-30T16:07:37.606110505+01:00 celery-translate stderr | [2024-01-30 15:07:37,605: ERROR/476] Could not fetch translations from OpenAI
2024-01-30T16:07:37.606120489+01:00 celery-translate stderr | [2024-01-30 15:07:37,605: ERROR/ForkPoolWorker-1] Could not fetch translations from OpenAI
celery-translate stderr | [2024-01-30 15:07:37,607: ERROR/476] psa/terminalstarctbctb_supporti18ninformctbsupport/en: failed automatic translation: IndexError: list index out of range
celery-translate stderr | [2024-01-30 15:07:37,607: ERROR/ForkPoolWorker-1] psa/terminalstarctbctb_supporti18ninformctbsupport/en: failed automatic translation: IndexError: list index out of range

How do you run Weblate?

Docker container

Weblate versions

  • Weblate: 5.3.1

Weblate deploy checks

No response

Additional context

No response

@nijel nijel self-assigned this Jan 31, 2024
@nijel nijel added the bug Something is broken. label Jan 31, 2024
@nijel nijel added this to the 5.4 milestone Jan 31, 2024
@nijel
Copy link
Member

nijel commented Jan 31, 2024

07acd5b fixes this.

@nijel nijel closed this as completed Jan 31, 2024
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants