Skip to content

RuntimeError: dictionary keys changed during iteration #129

@yangleir

Description

@yangleir

Hi,

Could you please check this error message?

Code:

from satsearch import Search

search = Search(bbox=[-110, 39.5, -105, 40.5])
print('bbox search: %s items' % search.found())

search = Search(datetime='2018-02-12T00:00:00Z/2018-03-18T12:31:12Z')

Error:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Input In [23], in <cell line: 6>()
      3 search = Search(bbox=[-110, 39.5, -105, 40.5])
      4 print('bbox search: %s items' % search.found())
----> 6 search = Search(datetime='2018-02-12T00:00:00Z/2018-03-18T12:31:12Z')

File /srv/conda/envs/notebook/lib/python3.9/site-packages/satsearch/search.py:26, in Search.__init__(self, **kwargs)
     24 """ Initialize a Search object with parameters """
     25 self.kwargs = kwargs
---> 26 for k in self.kwargs:
     27     if k == 'datetime':
     28         self.kwargs['time'] = self.kwargs['datetime']

RuntimeError: dictionary keys changed during iteration

Thanks
Lei

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions