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

Doesnt work. #117

Open
ededs opened this issue Aug 21, 2024 · 11 comments
Open

Doesnt work. #117

ededs opened this issue Aug 21, 2024 · 11 comments

Comments

@ededs
Copy link

ededs commented Aug 21, 2024

image
image
"KanjI" is being used as recognition. "Japanese" is the language i inputted.

@mikewcaldwell
Copy link
Contributor

What version of the plugin are you using? I know a bug like this was fixed recently. Can you attach your config.json file?

@fengduoyin
Copy link

What version of the plugin are you using? I know a bug like this was fixed recently. Can you attach your config.json file?

I seem to have the same issue here. Using Anki 24.06.3, installed forvo-dl freshly and it just doesn't want to look for pronunciation despite the word 100% having one. Attaching the version info, preferences and the config file.

image
image

config.json

@ArchesPatium
Copy link

I'm also having this issue. It happens from time to time. I'm not sure what makes it work again but it works and then when I try to use it, it simply doesn't anymore.

Ankiforvoproblem
config.json

@mikewcaldwell
Copy link
Contributor

Hmmm, I wonder if it's another issue with the HTTP headers. Can either of you turn on debug mode for the plugin and then attach the log files? It should log the exception so we can at least figure out what is going on.

To turn on debug mode you need to create an empty file .debug inside the user_files (same directory with config.json) directory of the plugin. Then it will create a log file here user_files/logs/debug

The full path of the file will be something like: .../Anki2/addons21/858591644/user_files/.debug

@fengduoyin
Copy link

fengduoyin commented Sep 23, 2024

Looks like the issue lies in permissions/authorization. Here's my debug result:

[Forvo.py] Using search query: 入口
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden

@ArchesPatium
Copy link

ArchesPatium commented Sep 23, 2024

After turning off the computer and on again, it works and nothing showed up on debug. Next time the issue shows up again I'll update here with the info on the debug folder
Anki

Edit:

Here I am, 8 hours after posting this and it's not working again. And, for some reason, nothing shows up in the debug folder so I can't contribute with that. I already restarted anki multiple times and no success.

Edit2:

An hour later, I didn't close anki nor did anything. Tried again and it worked. That's a really weird issue.

@mikewcaldwell
Copy link
Contributor

Looks like the issue lies in permissions/authorization. Here's my debug result:

[Forvo.py] Using search query: 入口 [Forvo.py] Reading result page [Forvo.py] Exception: HTTP Error 403: Forbidden

Hmmm, does it happen for you every time or only sometimes? Are you able to visit forvo.com just fine in the browser? Is there anything you can do that causes the issue to happen (like for example, making a bunch of requests)?

@mikewcaldwell
Copy link
Contributor

After turning off the computer and on again, it works and nothing showed up on debug. Next time the issue shows up again I'll update here with the info on the debug folder

Edit:

Here I am, 8 hours after posting this and it's not working again. And, for some reason, nothing shows up in the debug folder so I can't contribute with that. I already restarted anki multiple times and no success.

Edit2:

An hour later, I didn't close anki nor did anything. Tried again and it worked. That's a really weird issue.

Ah yeah, it looks like you made a folder named .debug, but the addon is expecting a file named .debug. Can you try again? I'm guessing it's probably the same issue that @fengduoyin is seeing but would be good to know. Is there anything you can think of that might cause the issue, or it just happens randomly?

@fengduoyin
Copy link

fengduoyin commented Sep 25, 2024

Looks like the issue lies in permissions/authorization. Here's my debug result:
[Forvo.py] Using search query: 入口 [Forvo.py] Reading result page [Forvo.py] Exception: HTTP Error 403: Forbidden

Hmmm, does it happen for you every time or only sometimes? Are you able to visit forvo.com just fine in the browser? Is there anything you can do that causes the issue to happen (like for example, making a bunch of requests)?

You know, I think I figured what's causing it, at least for me: it's searching for audio just fine until I turn on VPN (which I do when I want to watch something on Youtube while I'm making cards, as YT doesn't work in Russia otherwise).

I'm not quite sure why it doesn't want to work with VPN turned on though, because the website works perfectly fine, and I can donwload audio directly on there both with and without VPN.

Edit: played around and it works with VPN set on Netherlands or USA, but doesn't for VPN set on Poland and Finland. Neither have any restrictions on Forvo as far as I'm aware. Might be some underlying routing extravaganza happening.

@mikewcaldwell
Copy link
Contributor

Oh that's interesting, good catch. Sounds like it might be a cloudflare thing then.

@ArchesPatium
Copy link

ArchesPatium commented Sep 25, 2024

After turning off the computer and on again, it works and nothing showed up on debug. Next time the issue shows up again I'll update here with the info on the debug folder
Edit:
Here I am, 8 hours after posting this and it's not working again. And, for some reason, nothing shows up in the debug folder so I can't contribute with that. I already restarted anki multiple times and no success.
Edit2:
An hour later, I didn't close anki nor did anything. Tried again and it worked. That's a really weird issue.

Ah yeah, it looks like you made a folder named .debug, but the addon is expecting a file named .debug. Can you try again? I'm guessing it's probably the same issue that @fengduoyin is seeing but would be good to know. Is there anything you can think of that might cause the issue, or it just happens randomly?

Oh, yeah. I was supposed to create a file, not a folder. I fixed that.

I don't think it's the same issue since I don't use VPN. In my case, I have no idea what it could be since it just happens. I'm using it normally, and then it doesn't work anymore; the next day it works again.

I'm hoping for something to show up on the .debug file next time it stops working.

Edit:

AHA! Here's what I found on the bottom inside the debug file (And yes, I checked on forvo and there is this word there) It's the same issue as fengduoyin but in my case, there's no VPN to blame. :\

[Forvo.py] Using search query: 未だ
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden
[Forvo.py] Using search query: 未だ
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden
[Forvo.py] Using search query: 未だ
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden

Edit2:

It literally just worked. I found a result, closed the Forvo window by accident, tried it again and it doesn't work anymore. Literally a second after it was working. Now it no longer works.

[Forvo.py] Using search query: ふける
[Forvo.py] Reading result page
[Forvo.py] Done with reading result page
[Forvo.py] Initializing BS4
[Forvo.py] Initialized BS4
[Forvo.py] Searching language containers
[Forvo.py] Done searching language containers
[Forvo.py] Compiling list of available langs
[Forvo.py] Done compiling list of available langs
[Forvo.py] Searching lang container
[Forvo.py] Done searching lang container
[Forvo.py] Going through all pronunciations
[Forvo.py] Using search query: ふける
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden
[Forvo.py] Using search query: ふける
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden
[Forvo.py] Using search query: 空想
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden
[Forvo.py] Using search query: ふける
[Forvo.py] Reading result page
[Forvo.py] Exception: HTTP Error 403: Forbidden

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

No branches or pull requests

4 participants