Out of the box, running Python 3.5.5, I encountered the below error:
Traceback (most recent call last): File "push_posts_to_insightly.py", line 59, in <module> fetchRecordsFromInsightly() File "push_posts_to_insightly.py", line 56, in fetchRecordsFromInsightly i = Insightly(apikey=INSIGHTLY_API_KEY) File "K:\003_Scripts\web_services_development\aoi_webmap\post-processing\insightly.py", line 292, in __init__ self.owner_name = u.get('FIRST_NAME','') + ' ' + u.get('LAST_NAME','') TypeError: Can't convert 'NoneType' object to str implicitly
I fixed this issue by just adding a conditional to how self.owner_name gets assigned:
if u.get('FIRST_NAME','') ==None or u.get('LAST_NAME','') == None: self.owner_name = "None" else: self.owner_name = u.get('FIRST_NAME','') + ' ' + u.get('LAST_NAME','')
Out of the box, running Python 3.5.5, I encountered the below error:
Traceback (most recent call last): File "push_posts_to_insightly.py", line 59, in <module> fetchRecordsFromInsightly() File "push_posts_to_insightly.py", line 56, in fetchRecordsFromInsightly i = Insightly(apikey=INSIGHTLY_API_KEY) File "K:\003_Scripts\web_services_development\aoi_webmap\post-processing\insightly.py", line 292, in __init__ self.owner_name = u.get('FIRST_NAME','') + ' ' + u.get('LAST_NAME','') TypeError: Can't convert 'NoneType' object to str implicitlyI fixed this issue by just adding a conditional to how self.owner_name gets assigned:
if u.get('FIRST_NAME','') ==None or u.get('LAST_NAME','') == None: self.owner_name = "None" else: self.owner_name = u.get('FIRST_NAME','') + ' ' + u.get('LAST_NAME','')