Hi, I am getting below message when trying to retu...
# ask-community
p
Hi, I am getting below message when trying to return a list from an ops
Copy code
is not picklable. You are currently using the fs_io_manager and the multi_or_in_process_executor. You will need to use a different io manager to continue using this output. For example, you can use the mem_io_manager with the in_process_executor
t
Hmm, I get why this can be confusing. If you were to print out the type of the value that you're returning from the op, what would it be? What's often the case is that the return value for your op isn't actually a list, but rather an instance of a Python class or a generator. Hence why it's not picklable.
p
You might be right
Copy code
Object [<sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3df760>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3df820>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3df520>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3df190>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3defe0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3dee30>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3deb90>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3de9e0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3de7d0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d3de5c0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d418190>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d418340>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d4184f0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d4186a0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d418850>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d418a00>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d418bb0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d418d60>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d418f10>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d4190c0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419270>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419420>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d4195d0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419780>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419930>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419ae0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419c90>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419e40>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d419ff0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a1a0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a230>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a2c0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a350>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a3e0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a470>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a500>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a590>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a620>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a6b0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a740>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a7d0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a860>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a8f0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41a980>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41aa10>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41aaa0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41ab30>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41abc0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41ac50>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41ace0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41ad70>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41ae00>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41ae90>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41af20>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41afb0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b040>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b0d0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b160>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b1f0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b280>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b310>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b3a0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b430>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b4c0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b550>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b5e0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b670>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b700>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b790>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b820>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b8b0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b940>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41b9d0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41ba60>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41baf0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41bb80>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41bc10>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41bca0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41bd30>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41bdc0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41be50>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41bee0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d41bf70>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d430040>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d4300d0>, <sqlalchemy.ext.automap.kpi_selection_group object at 0x7f5e8d430160>]
t
oh, in you're case we're both right! You're right in that it is a list, but it's a list of sqlalchemy objects, which can't be pickled. you'd likely want to fetch/yield the underlying data from those connections first and then return the list of that data. cheers!
p
Thanks for the hint, I will go that route.