26 Jan
2024
26 Jan
'24
3:57 p.m.
Marco van Tol writes:
I tried to change to ‘hash’, but the code in that bit of the function has not been tested enough.
For example
hole = sha224(hole.encode('utf8')).hexdigest()
comes back with that the bytes object hole does not have an encode() method. When I change it tohole = sha224(hole).hexdigest()
, the following error is:text = text[:match.start()] + hole + text[match.end():] TypeError: can't concat str to bytes
The ‘hash’ part of that function needs some debugging.
This is all deep in Django/Haystack/Xapian. You will get better advice there.