error when getting a word's summary
See original GitHub issue` import wikipedia print(wikipedia.summary(“Ubuntu”))
The code that caused this warning is on line 389 of the file C:\Users\karim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wikipedia\wikipedia.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.
lis = BeautifulSoup(html).find_all('li')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\karim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wikipedia\util.py", line 28, in __call__
ret = self._cache[key] = self.fn(*args, **kwargs)
File "C:\Users\karim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wikipedia\wikipedia.py", line 231, in summary
page_info = page(title, auto_suggest=auto_suggest, redirect=redirect)
File "C:\Users\karim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wikipedia\wikipedia.py", line 276, in page
return WikipediaPage(title, redirect=redirect, preload=preload)
File "C:\Users\karim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wikipedia\wikipedia.py", line 299, in __init__
self.__load(redirect=redirect, preload=preload)
File "C:\Users\karim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\wikipedia\wikipedia.py", line 393, in __load
raise DisambiguationError(getattr(self, 'title', page['title']), may_refer_to)
wikipedia.exceptions.DisambiguationError: "bantu" may refer to:
Bantu languages
Bantu peoples
Bantu knots
Black Association for Nationalism Through Unity
Bantu (band)
Bantu (album)
Bantu FC
Bantu expansion
Bantustan`
it used to work normally before but now i just randomly get this error for some reason.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Word 2013 error in opening a document - Microsoft Community
Getting this message on opening a Word 2013 document. ... I get the message: Image. I have checked the document and there is...
Read more >Typo (Typographical Error) | What is One Example of a Typo?
Lesson Summary · A typo is the shortened form of the words typographical error. · Typos may be used intentionally. · Typos are...
Read more >Error analysis (linguistics) - Wikipedia
In linguistics, according to J. Richard et al., (2002), an error is the use of a word, speech act or grammatical items in...
Read more >How to Approach Identifying Sentence Errors: SAT Writing ...
Before marking anything down, however, make sure you can articulate why the underlined word or phrase is wrong. Many answers may sound odd ......
Read more >Overview of Error Analysis
Error analysis is a method used to document the errors that appear in learner language, determine whether those errors are systematic, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Auto suggestion is turned on by default for
summary. This is mind-boggling terrible and the fact that it ever works is frankly miraculous. Turn it off:@KairaNithin That looks like it’s working as intended? That query is too vague so of course it throws a DisambiguationError, but at least it didn’t get transformed into something completely different like with
Ubuntuturning intobantu, even though there’s an Ubuntu page.