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

Could not get translations error #59

Closed
ArielSFP opened this issue Nov 19, 2022 · 8 comments · Fixed by #62
Closed

Could not get translations error #59

ArielSFP opened this issue Nov 19, 2022 · 8 comments · Fixed by #62

Comments

@ArielSFP
Copy link

Hello,
I have just installed anki today, and alongside it pull from Duolingo. I followed the steps for importing words from Duolingo, and it asked me if I wanted to add 341 notes from the Japanese language, which is approximately what I've learned so far. I pressed yes, it started syncing and a moment later an error shows up saying "Could not get translations". I've tried uninstalling and reinstalling both anki and pull from duolingo, and it didn't do anything, so I suspect the error could be caused because of Duolingo's new design?

@mkramskoy
Copy link

Same here. Doesn't work on Anki Version ⁨2.1.54 (b6a7760c)⁩

Screenshot 2022-11-20 at 16 58 03
Screenshot 2022-11-20 at 16 58 08

@JASchilz
Copy link
Owner

Hi folks . Thanks for reporting this.

It looks like Duolingo has changed something about their service and specifically the way programs can reach out to Duolingo to get translations. The AnkiSyncDuolingo plugin uses a third party code library to talk to Duolingo, and other users of that library are reporting an issue similar to yours.

So it looks like this isn't a thing that I can readily fix, and other people will be running into the same problem as you. I'm going to post a prominent notice that (at the current time, anyway) this plugin is broken. I'll look into the issue more this weekend, but as it's a holiday I might not get a chance to really look into it until December 3rd.

@Coqueiro
Copy link

Thanks for the prompt response, @JASchilz!

@JASchilz
Copy link
Owner

Of course!

I'm still not able to look into this in any depth until next weekend, but next weekend if I can't address the issue of getting translations then I'll at least release a version which allows you to import words without their translations:

  • it will be some extra work for you to provide the translation yourself as you work through the new cards
  • and this flow won't work well at all for people importing a huge number of cards
  • but at least it will be somewhat useful in making cards for your new vocabulary

@swa72
Copy link

swa72 commented Dec 3, 2022

Actually, I got the "Could not get translations" message as well. Today that changed to ...

2022-12-03 15_02_13-Clock

when pulling approx. 204 from my Spanish course. Maybe one can only pull in chunks of 10 or so?

@JASchilz
Copy link
Owner

JASchilz commented Dec 4, 2022

Hi @swa72 . Thanks for this report! I'm able to see the same thing you're seeing. And when I make a similar request in my browser by visiting https://d2.duolingo.com/api/1/dictionary/hints/ro/en?tokens=%5B%22da%22%5D, I get a "d2.duolingo.com’s server IP address could not be found."

These errors are telling me that they've actually shut down the server that we were using for translations.

I'm not an expert in talking to the Duolingo servers...I've been using other code libraries for that which made use of these pages that aren't working any longer. And it looks like no one has found an alternate method of getting translations from Duolingo yet, if that's even possible now. So I think I'm going to release a new version of the plugin that just doesn't get the translations: you'll still be able to pull down your words and make new cards from them, but you'll have to edit in the translation on your first review. And then I can keep an eye out to see if other people find a way to get translations from Duolingo.

@JASchilz
Copy link
Owner

JASchilz commented Dec 4, 2022

OK folks. Thank you again for raising this issue.

Unfortunately, it looks like Duolingo has closed down the service that this plugin was using to get translations. To be clear, that's not really Duolingo's fault: they develop those services for their own applications, and they've never made any kind of promise, commitment, or even acknowledgement to keep those services running for third party libraries like this one.

So I've released a new version of the plugin that gets your vocabulary, without errors and without translations. The idea is that you can provide the translation on your first edit. That's an OK workflow if you're learning and making cards in small batches, but I do acknowledge that it's less convenient if you're pulling down large amounts of Duolingo vocabulary in bulk.

I've closed this issue, as representing the bug that you couldn't make cards at all without error. I've created a new issue #61 as more of a feature request for other ways to retrieve translations. It might not ultimately be feasible for this plugin to provide translations, but you can follow my thoughts and work on that issue, if you like.

@swa72
Copy link

swa72 commented Mar 4, 2023

Worked like a charm. Thanks a lot.

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

Successfully merging a pull request may close this issue.

5 participants