So I'm testing PyDictionary out for a project, and so have written out a very short program just to make sure i've installed it properly and so on
from PyDictionary import PyDictionary
dictionary=PyDictionary()
var = dictionary.synonym("life")
print var
And this works, however, it also returns the following before it prints the list of synonyms.
.local/lib/python2.7/site-packages/bs4/__init__.py:181: 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.
The code that caused this warning is on line 4 of the file dicttest.py. To get rid of this warning, change code that looks like this:
BeautifulSoup([your markup])
to this:
BeautifulSoup([your markup], "lxml")
markup_type=markup_type))
I am not sure what to change my code to, to remove this issue. I thought maybe changing line 4 to var = (dictionary.synonym("life"), "lxml")
might help, and tried variations of it, but the error still appears. Maybe there is a variation I've missed. Overall I'm not sure what to do.
Cheers for any help you can give.
Edit: Other answers have been pointed out to me, which make it seem like a simple fix, but I don't quite understand what I would change as my code is a bit different to the recommendation the error gives.