While working with sqlalchemy backend for DB and strategy worker and Kafka backend for spider. Found out that in the file frontera.worker.server.WorkerJsonRpcService there is this function
And in the Resource class which the class where the putChild function is defined, I saw this line
def putChild(self, path: bytes, child: IResource) -> None:
if not isinstance(path, bytes):
raise TypeError(f"Path segment must be bytes, but {path!r} is {type(path)}")
So it always throws the TypeError as we send a string as first param in putChild and accept it to be bytes.
Changing the code to below works, but is not elegant as I don't wan't to modify library code just for this usecase.
While working with sqlalchemy backend for DB and strategy worker and Kafka backend for spider. Found out that in the file
frontera.worker.server.WorkerJsonRpcService
there is this functionAnd in the
Resource
class which the class where theputChild
function is defined, I saw this lineSo it always throws the TypeError as we send a string as first param in putChild and accept it to be bytes. Changing the code to below works, but is not elegant as I don't wan't to modify library code just for this usecase.
Happy to raise a PR post discussion !