C2W3_Assignment - exercise 12 display_artifacts issue

Hello Mentors,

I am getting a problem with the display_artifacts function. I have had 110/120. I wonder if the problem is not somewhere else because i have tried everything from deleting the pipeline folder to rewriting the entire notebook.

Here is the error I am getting:

AttributeError Traceback (most recent call last)
7 # Display the results
----> 8 display_artifacts(store, parent_artifacts, base_dir)

~/work/util.py in display_artifacts(store, artifacts, base_dir)
45 table = {‘artifact id’: , ‘type’: , ‘uri’: }
46 for a in artifacts:
—> 47 table[‘artifact id’].append(a.id)
48 artifact_type = store.get_artifact_types_by_id([a.type_id])[0]
49 table[‘type’].append(artifact_type.name)

AttributeError: id


Looks like my artifact instance has id and probably should have something like artifact_id instead:

id: 7
type_id: 14
uri: “./pipeline/Transform/transform_graph/7”
custom_properties {
key: “name”
value {
string_value: “transform_graph”
custom_properties {
key: “producer_component”
value {
string_value: “Transform”
custom_properties {
key: “state”
value {
string_value: “published”
create_time_since_epoch: 1624300464336
last_update_time_since_epoch: 1624300589710

I think you are really close. The last thing to do is get the artifacts, so you might want to try another method other than the “get_events_by_artifact_ids.”

Good luck!


Got it thank you! get_artifacts_by_id :slight_smile:


I deleted the full code so that I dont give away the solution. Only the problematic line is left. Thanks again @davidlowe

1 Like