----> 1 if person.network is None:
2 print('person.network does not exist')
3
AttributeError: 'Person' object has no attribute 'network'
As you can see on line 1, I'm checking if 'network' doesn't exist. However, when it doesn't exist it fails and throws a python error. I'm a bit lost as to how this is happening. Shouldn't line 1 catch this exact problem?
The actual code properly goes through about 10 records before failing when one of them doesn't have 'network' defined.