Python TypeError

801
2
Jump to solution
06-20-2021 03:37 AM
Labels (1)
HamzaM
by
New Contributor III

I am trying to use the Detecting Super Blooms Using Satellite Image Classification Sample Notebook but when i test this code: 

map1 = gis.map(address, zoomlevel = 12)
map1.center = location
map1

map1_selected = call_filter_images(map1, "2019-03-18")
img_src=map1_selected

this error occurs

Applicable lockRasterIds= []
 
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
In  [28]:
Line 1:     map1_selected = call_filter_images(map1, "2019-03-18")

In  [26]:
Line 5:     [tdf, selected] = filter_images(my_map, start_datetime, end_datetime, extent = area['extent'])

TypeError: cannot unpack non-iterable NoneType object
0 Kudos
1 Solution

Accepted Solutions
HamzaM
by
New Contributor III

The problem was with the date once i changed it, it worked fine.

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

The error message

cannot unpack non-iterable NoneType object

means None was returned by my_map (which doesn't appear anywhere) and the "filter_images" function was supposed to return and unpack two objects (tdf, selected)

So my_map doesn't exist, 

map1_selected isn't used

map1 isn't defined, but maybe not selected.

In short, you will need to backtrack and figure out what wasn't found that returned None


... sort of retired...
HamzaM
by
New Contributor III

The problem was with the date once i changed it, it worked fine.

0 Kudos