1👍
✅
Okay, so after poking and investigating why it did that. I noticed that the type
of the object wasn’t a true string
type, or in this case str
. I use BeautifulSoup to get data from some XML files and when I used bs4.find().string
it gave me a NavigableString
instead of a normal string.
So for future reference, be sure that the type
is the right one. Feeding a NavigableString
to Django filter gave me this unexpected error
Source:stackexchange.com