Barry Sun06/02/2022, 7:41 AM
in successfully (by passing the
into the logger) but when I run this `context.resources.io_manager.handle_output(context, obj=df)`I get the error
. Which suggests that when I pass the dataframe into the io_manager, it becomes a NoneType. How does this work?
AttributeError: 'NoneType' object has no attribute 'to_parquet'
owen06/02/2022, 3:59 PM
(this will get automatically called by framework code to store the outputs of your ops). so if you have an op defined as
then the io manager will automatically be invoked on some_pandas_dataframe. So I think what's happening in your case is that you're manually calling this handle_output function inside the body of your op (which will succeed), and then not returning a value from your op, so then when dagster invokes the handle_output function automatically, it will be invoked on the return value of your op (which is None).
@op def do_some_output(context): # ... return some_pandas_dataframe
Barry Sun06/02/2022, 11:28 PM
owen06/02/2022, 11:31 PM