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.

Warning from BeautifulSoup

See original GitHub issue
/usr/lib/python3.4/site-packages/bs4/__init__.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). 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.

To get rid of this warning, change this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "lxml")

  markup_type=markup_type))```

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
timabbottcommented, Aug 16, 2017

We had the same problem with a missing setup.py. @geekpradd can you do a release in pypi with this fix? It should be trivial.

1reaction
srghmacommented, May 7, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get rid of BeautifulSoup user warning? - Stack Overflow
The message is telling you exactly what to do: BeautifulSoup([your markup], "html.parser") . Did you do that and see what your output is?...
Read more >
BeautifulSoup Parser Warning · Issue #49 · ckreibich/scholar.py
py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This ...
Read more >
Python - how to get rid of BeautifulSoup user warning
When I run the following 'BeautifulSoup' code, I get a warning message. How can I fix the warning message? request = urllib.request.
Read more >
BeautifulSoup incorrectly warns me that I'm an idiot
This warning is a bug because it's surprise behaviour. ... It may annoy you that Beautiful Soup alerts you to something you think...
Read more >
Annoying BeautifulSoup user warning. - Python Forum
As far as i know the only way to get rid of the warning is to give BeautifulSoup class a second arg defining...
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