-
Notifications
You must be signed in to change notification settings - Fork 521
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
Empty 'extract' in Wikipedia response causes 'TypeError: list indices must be integers, not str'. #32
Comments
This seems to be the code that causes the problem:
For this particular page ("Fully connected network") the 'extract' is empty, so the title becomes empty as well. Then the code tries to get the wikipedia page with empty title:
, which eventually causes the exception in these lines:
|
I'll look into it. Do you have any idea why |
I am not very familiar with the Wikipedia API – just started using it.
Why aren't you using the 'redirects' key?
|
To be honest I never knew that 'redirects' was a key you could request in the Mediawiki API, great catch! That's definitely a better solution than the hacky parsing it's doing now. I'll work on a patch this weekend. |
I get the same error with this line:
The error message is:
|
The text was updated successfully, but these errors were encountered: