aitjcize / cppman

C++ 98/11/14 manual pages for Linux/MacOS
GNU General Public License v3.0
1.27k stars 79 forks source link

UserWarning: No parser was explicitly specified #49

Closed cslarsen closed 8 years ago

cslarsen commented 8 years ago

I've got a stock Python 3 installation (I think), and I get a BeautifulSoup warning:

~ » cppman vector::begin
/opt-local/lib/python3.3/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))

Upgrading BeautifulSoup doesn't work:

~ » pip install --upgrade BeautifulSoup
Collecting BeautifulSoup
  Using cached BeautifulSoup-3.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-4ek1lu/BeautifulSoup/setup.py", line 22
        print "Unit tests have failed!"
                                      ^
    SyntaxError: invalid syntax
aitjcize commented 8 years ago

You can ignore the warning, it should still work despite of it. I've fixed it in the master branch, and will release a new version soon. Thanks for reporting!