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

Title resolution leads to internal error #316

Open
grossmanm opened this issue Nov 17, 2022 · 1 comment
Open

Title resolution leads to internal error #316

grossmanm opened this issue Nov 17, 2022 · 1 comment

Comments

@grossmanm
Copy link

Whenever I run the line
wikipedia.page("New York City")
The api returns an error indicating there is no page for 'new york sity'. The error occurs on line 270 of wikipedia.py
results, suggestion = search(title, results=1, suggestion=True)
where title='new york city' resolves to 'new york sity' for whatever reason

@arez-khidr
Copy link

I had this error as well. Seems to be an error in the API, when I ran this, it returned that "new york sity" is the actual title for the page. Which is ridiculous, here is my code though:

import wikipedia

suggestion = wikipedia.suggest("New York City")

sity = wikipedia.page(suggestion)
print(sity.url)

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

2 participants