Closed jiawlu closed 3 years ago
This is explained in the docs: https://docs.osmcode.org/pyosmium/latest/troubleshooting.html#runtimeerror-callback-keeps-reference-to-osm-object
This is explained in the docs: https://docs.osmcode.org/pyosmium/latest/troubleshooting.html#runtimeerror-callback-keeps-reference-to-osm-object
@joto I am surprised that you closed the issue without having a try the code I provide. I was using a clean environment in Colab, and the thing is the code runs well on my local computers. Finally, I have figured it out. The reason is computers used in Colab is a little bit slow. Sometimes, the pointer for the last node has not been fully destroyed when a new one is being created, which will result in the error I reported. Hope that is helpful to you.
pyosmium runs pretty well on my local windows and Linux machines, but I met the RuntimeError when I use it on Google colab. I have shared the code link below
https://colab.research.google.com/drive/18812oz3bs-efdC57_Nq3NGllkGw5Ewtb?usp=sharing