You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/ybon/.virtualenvs/geozone/bin/addok", line 11, in <module>
sys.exit(main())
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/bin/__init__.py", line 30, in main
args.func(args)
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/shell.py", line 478, in invoke
cmd.loop()
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/shell.py", line 74, in loop
self.cmdloop()
File "/usr/lib64/python3.6/cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "/usr/lib64/python3.6/cmd.py", line 216, in onecmd
return self.default(line)
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/shell.py", line 66, in default
return self.do_SEARCH(line)
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/shell.py", line 196, in do_SEARCH
self._search(query)
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/shell.py", line 166, in _search
results = helper(query, lat=lat, lon=lon, **filters)
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/core.py", line 169, in __call__
return self.render()
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/core.py", line 183, in render
self.convert()
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/core.py", line 230, in convert
processor(self, result)
File "/home/ybon/Code/py/addok-geozones/addok_geozones/utils.py", line 32, in follow_successor
successor = Result.from_id(id)
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/core.py", line 107, in from_id
return Result(dbkeys.document_key(_id))
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/core.py", line 35, in __init__
self.load(_id)
File "/home/ybon/.virtualenvs/geozone/lib/python3.6/site-packages/addok/core.py", line 45, in load
raise ValueError('id "{}" not found'.format(doc_or_id[2:]))
ValueError: id "fr:commune:27049@2016-01-01" not found
When searching for "épinay" with latest dataset.
Having a quick look at it, it seems that the bug appears because some city have a successor which has a successor itself, so the first target does not exist in the dataset.
I'll work around for now, to prevent a crash.
Added a log:
Unable to find successor fr:commune:27049@2016-01-01 from id fr:commune:27221@1942-01-01
Unable to find successor fr:commune:61324@2016-01-01 from id fr:commune:61155@1942-01-01
When searching for "épinay" with latest dataset.
Having a quick look at it, it seems that the bug appears because some city have a successor which has a successor itself, so the first target does not exist in the dataset.
I'll work around for now, to prevent a crash.
cc @davidbgk
The text was updated successfully, but these errors were encountered: