Issue with C2W3 exercise 9

Hi,

I am stuck with exercise 9.

I am using the following code:

START CODE HERE

Use StatisticsGen to compute the statistics using the curated schema

statistics_gen_updated = StatisticsGen(result = user_schema_importer.outputs[‘result’])

Run the component

context.run(statistics_gen_updated)

END CODE HERE

however, do not get the expected result. Error message is


TypeError Traceback (most recent call last)
in
1 ### START CODE HERE ###
2 # Use StatisticsGen to compute the statistics using the curated schema
----> 3 statistics_gen_updated = StatisticsGen(result = user_schema_importer.outputs[‘result’])
4
5

TypeError: init() got an unexpected keyword argument ‘result’

Pls. advise, thanx in advance
Jörn

You are close, and here are a couple of suggestions…

First, the error message “TypeError: init () got an unexpected keyword argument ‘result’” was explicit, so you have a typo with the StatisticsGen component. Perhaps try another argument for StatisticsGen such as “schema” and see how it goes.

Second, you might want to take a look at the API documentation for StatisticsGen and see exactly what the component expects.