soerenuhrbach / vscode-deepl

DeepL for Visual Studio Code
MIT License
33 stars 7 forks source link

Authentication failed. Please check your DeepL API key. You may be using the DeepL Pro API by mistake. #40

Closed bakemocho closed 7 months ago

bakemocho commented 7 months ago

Thank you for creating the extension!

The message "Authentication failed. Please check your DeepL API key. You may be using the DeepL Pro API by mistake." remained the same even after I turned on deepl.usePro.

However, when I changed my plan from DeepL Pro Advanced to DeepL API, the error disappeared and I was able to translate! It seems that this extension is not compatible with the DeepL Pro Advanced API key.

But then, another issue came up. Even though translations work fine, I now get the message, "Unfortunately, the DeepL API cannot accept any requests at the moment. Please try again later. (Value for 'source_lang' not supported.)"

I would like to have this message removed.

bakemocho commented 7 months ago

The feature that automatically displays the translation of selected text in a pop-up window is working very well. It works so efficiently that it's almost worrisome. Is it normal that the text is translated automatically just by selecting it (without using a command)? That's incredibly amazing!

After selecting text, if I choose "DeepL: Translate" or "DeepL: Translate below the original" from the right-click menu, the message "Unfortunately, the DeepL API cannot accept any requests at the moment. Please try again later. (Value for 'source_lang' not supported.)" appears. The same thing happens when I select these options from the command palette.

When I press 'alt+t', a '†' symbol is displayed, and since 'ctrl+alt+t' is used by another extension, I haven't tried it.

soerenuhrbach commented 7 months ago

Hi @bakemocho,

Could you please provide the debug information from the output window? (Make sure to remove your api key)

image

It seems that there is a problem with the source language - Does it work when you use the command "DeepL: Translate from ... to ..."?

bakemocho commented 7 months ago

After receiving your reply, I tried 'DeepL: Translate from ... to ...' and the error message stopped appearing! If it was just a matter of using it incorrectly, I'm sorry... I'll attach the debug information that I was able to obtain. I hope it will be helpful. error_bakemocho.txt

soerenuhrbach commented 7 months ago

I'm not 100% confident what your issues caused but I made some stability and usability improvements to avoid future issues like this. These improvements are released with version 1.0.8.

If the issue occurs again just reopen this issue and reach out to me.

Thanks for your support.