You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
While using Deepl free plan if I set WEBLATE_MT_DEEPL_API_URL to https://api-free.deepl.com/v2 original (paid plan) URL is still used.
I already tried
In docker-compose.override.yml set WEBLATE_MT_DEEPL_API_URL: https://api-free.deepl.com/v2/
Started docker image, run bash (docker-compose exec --user weblate weblate bash), env shows variable set but weblate auto_translate --mt deepl xxx xxx en throws traceback
To Reproduce the issue
Steps to reproduce the behavior:
set WEBLATE_MT_DEEPL_API_URL: https://api-free.deepl.com/v2/ in docker-compose.override.yml
[2021-05-29 22:32:21,283: WARNING/1526] Machinery error: HTTPError: 403 Client Error: Forbidden for url: https://api.deepl.com/v2/languages
[2021-05-29 22:32:21,284: ERROR/1526] Failed to fetch languages from DeepL, using defaults
[2021-05-29 22:32:21,309: WARNING/1526] Handled exception: MachineTranslationError: HTTPError('403 Client Error: Forbidden for url: https://api.deepl.com/v2/languages')
Traceback (most recent call last):
File "/usr/local/bin/weblate", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/weblate/runner.py", line 34, in main
utility.execute()
File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.7/dist-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.7/dist-packages/weblate/utils/management/base.py", line 42, in execute
return super().execute(*args, **options)
File "/usr/local/lib/python3.7/dist-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/management/commands/auto_translate.py", line 122, in handle
translation=translation,
File "/usr/local/lib/python3.7/dist-packages/celery/local.py", line 188, in __call__
return self._get_current_object()(*a, **kw)
File "/usr/local/lib/python3.7/dist-packages/celery/app/task.py", line 388, in __call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/celery/app/autoretry.py", line 34, in run
return task._orig_run(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/tasks.py", line 389, in auto_translate
auto.process_mt(engines, threshold)
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/autotranslate.py", line 177, in process_mt
translations = self.fetch_mt(engines, int(threshold))
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/autotranslate.py", line 165, in fetch_mt
threshold=threshold,
File "/usr/local/lib/python3.7/dist-packages/weblate/machinery/base.py", line 380, in batch_translate
translation.component.source_language, translation.language
File "/usr/local/lib/python3.7/dist-packages/weblate/machinery/base.py", line 286, in get_languages
raise MachineTranslationError(repr(self.supported_languages_error))
weblate.machinery.base.MachineTranslationError: HTTPError('403 Client Error: Forbidden for url: https://api.deepl.com/v2/languages')
$ weblate check --deploy
[2021-05-29 22:37:35,257: INFO/1673] configured Sentry error collection, extras: {}
System check identified some issues:
WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
System check identified 3 issues (1 silenced).
The text was updated successfully, but these errors were encountered:
Describe the issue
While using Deepl free plan if I set WEBLATE_MT_DEEPL_API_URL to https://api-free.deepl.com/v2 original (paid plan) URL is still used.
I already tried
In
docker-compose.override.yml
setWEBLATE_MT_DEEPL_API_URL: https://api-free.deepl.com/v2/
Started docker image, run bash (
docker-compose exec --user weblate weblate bash
), env shows variable set butweblate auto_translate --mt deepl xxx xxx en
throws tracebackTo Reproduce the issue
Steps to reproduce the behavior:
WEBLATE_MT_DEEPL_API_URL: https://api-free.deepl.com/v2/
indocker-compose.override.yml
docker-compose up -d
docker-compose exec --user weblate weblate bash
env | grep WEBLATE_MT_DEEPL_API_URL
showsWEBLATE_MT_DEEPL_API_URL=https://api-free.deepl.com/v2/
weblate auto_translate --mt deepl xxx xxx en
Expected behavior
Free plan URL is used
Exception traceback
Server configuration and status
Weblate installation: Docker
[2021-05-29 22:35:57,670: INFO/1614] configured Sentry error collection, extras: {}
Weblate deploy checks
The text was updated successfully, but these errors were encountered: