rapidtech1898_10568
06/29/2025, 9:38 AMUserData - 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?Answer Overflow
06/29/2025, 9:38 AMReal1ty
06/30/2025, 8:47 AMpython
request_queue = await Actor.open_request_queue()
for e in inpCombinations:
newReq = Request.from_url(
baseLink,
user_data=list(e) # tuple → list
)
await request_queue.add_request(newReq)
await Actor.exit()
Use a dict if you want named fields:
python
newReq = Request.from_url(
baseLink,
user_data={ "role": e[0], "location": e[1], /* … */ }
)
If you really must keep tuples, you can suppress Pydantic’s warnings globally—but it’s generally better (and safer for anything consuming your queue) to stick with lists or dicts.
Hope this helps!rapidtech1898_10568
07/05/2025, 5:39 PMrapidtech1898_10568
07/05/2025, 5:40 PMUserData - serialized value may not be as expected [input_value={'search': ['electrician'...dom'], 'excluded': ['']}, input_type=dict])
return self.serializer.to_python(rapidtech1898_10568
07/07/2025, 2:44 PMinpCombinations = list(itertools.product(inpSearchWords, inpSearchLoc))
inpCombinations = [list(x) for x in inpCombinations]
Actor.log.info(inpCombinations)
Actor.log.info(len(inpCombinations))
baseLink = "https://www.bing.com/maps"
request_queue = await Actor.open_request_queue()
for i,e in enumerate(inpCombinations, start=1):
newReq = Request.from_url(f"https://www.bing{i}.com/maps")
newReq.user_data = e
await request_queue.add_request(newReq)rapidtech1898_10568
07/07/2025, 2:45 PMPydanticSerializationUnexpectedValue(Expected `UserData` - serialized value may not be as expected [input_value=['builder', 'Salzburg'], input_type=list])
How can i get rid of that?Real1ty
07/12/2025, 11:42 AM