RapidTech1898R
Apify & Crawlee9mo ago
7 replies
RapidTech1898

Getting Pydantic warning when building Requeset Queue

I try to build a request queue using the following code:
(the user-data i want to add is a tuple)

request_queue = await Actor.open_request_queue()
for e in inpCombinations:
newReq = Request.from_url(baseLink)
newReq.user_data = e
await request_queue.add_request(newReq)
await Actor.exit()

but i allways get this warning:

C:\DEVNEU.venv\apify\Lib\site-packages\pydantic\type_adapter.py:572: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Expected
UserData
- serialized value may not be as expected [input_value=('electrician', 'Southamp...England,United Kingdom'), input_type=tuple])
return self.serializer.to_python(

How can i get rid off this warning?
Was this page helpful?