I have the following Xpath:
bathroom = response.xpath(“.//div[1][contains(., 'Baños’)]/text()").extract_first()
And I get this error:
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
I've tried the solutions given in these other similar questions:
Filtering out certain bytes in python
but none has resolved my problem!
Note: with the solution of the first link, I obviously replaced the 'input_string' by let's say word = "baños"
, and I got an error like "the function has one argument, 2 given..."
Can anyone help?