UnicodeEncodeError on passing a unicode URL with non-ASCII chars
Bug #1640853 reported by
Tobias Krönke
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Very simple to replicate (bug is in the warning call of _check_
>>> BeautifulSoup(u'http://ü', features='lxml')
...Traceback...
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 8: ordinal not in range(128)
>>> bs4.__version__
'4.5.1'
python 2.7
To post a comment you must log in.
Might this be a bug of python? Don't have it with 2.7.11 (but with <=2.7.10), but also the warning is "swallowed". And more interestingly, if trying in interactive shell, only the first call will fail. Consecutive calls with the same string don't.