Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

expected str instance, NoneType found

# cause of error
','.join([None])    # something along these lines

# solution 1 (convert None in list to string)
','.join(map(str,[None])) 

# solution (filter None from a list)
 ','.join(filter(None, ['a', None, 'c']))  # removes None or 'Falsey' from Array
 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #expected #str #NoneType
ADD COMMENT
Topic
Name
4+7 =