question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I tried this:

import wikipedia
print(wikipedia.search("Ubuntu"))

It gave me this:

/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py:389: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html5lib"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 389 of the file /home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py. To get rid of this warning, pass the additional argument 'features="html5lib"' to the BeautifulSoup constructor.

  lis = BeautifulSoup(html).find_all('li')
Traceback (most recent call last):
  File "/home/sjs/msg/fbchat/wiki.py", line 2, in <module>
    print(wikipedia.summary("Ubuntu"))
  File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/util.py", line 28, in __call__
    ret = self._cache[key] = self.fn(*args, **kwargs)
  File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py", line 231, in summary
    page_info = page(title, auto_suggest=auto_suggest, redirect=redirect)
  File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py", line 276, in page
    return WikipediaPage(title, redirect=redirect, preload=preload)
  File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py", line 299, in __init__
    self.__load(redirect=redirect, preload=preload)
  File "/home/sjs/.local/lib/python3.9/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

I installed this package from pip: pip install wikipedia Python Version: 3.9.1

What’s wrong?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
MS-Jahancommented, Jan 28, 2021

Same bro 😦

I’ve started using pymediawiki. Try this out.

1reaction
iamtheefcommented, Jan 30, 2021

Also, “goat” returns results for boat and “sheep” returns results about “ship” xD

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sound Coming Out of the Wrong Speaker on Your PC? Try ...
Sound Coming Out of the Wrong Speaker on Your PC? Try This Quick Fix · Quickly Change Your Output Device · Set Default...
Read more >
Why is my Python code producing the wrong output? - Quora
So it will always execute elif condition because a character will never equal to an integer. You will get counta = 0 always...
Read more >
Help me ! wrong output format Unexpected end of file — int32 ...
The error message is complaining that it's expecting more things in your output (specifically an int32), but instead it found that your output...
Read more >
Sound coming out of wrong device/not playing (2 sound outputs)
Sound coming out of wrong device/not playing (2 sound outputs) ... Try setting the speaker as the default audio output device.
Read more >
Wrong Output · Issue #137998 · microsoft/vscode - GitHub
Above is the code to reverse a number, the logic is perfectly alright but vs code is returning wrong output, i tried the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found