terryyin / terryyin/translate-python

Microsoft API fails

Open
#98 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
759
Forks
152
PR merge metrics
No merged PRs in 30d

Description

translator = Translator(provider='microsoft', secret_access_key='KEY1....', to_lang='eng',
from_lang='ch')

fails with

    return ' '.join(self.provider.get_translation(text_wraped) for text_wraped in text_list)
  File "C:\py38_64\lib\site-packages\translate\providers\microsoft.py", line 47, in get_translation
    raise TranslationError(data["error"]["message"])
translate.exceptions.TranslationError: The request is not authorized because credentials are missing or invalid.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Microsoft provider at microsoft.py line 47 and review how the supplied secret_access_key is used in the request. Reproduce the authorization error with the reported provider configuration and verify whether the credentials are accepted; done means the provider translates successfully or reports a confirmed, actionable credential issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.