jremillard / images-to-osm

Use Mask R-CNN/Keras/TensorFlow and OSM to find features in satellite images for fun.
MIT License
500 stars 84 forks source link

Cannot run getdatafromosm.py properly #29

Open hideoshiraishi opened 3 years ago

hideoshiraishi commented 3 years ago

I built a virtual environment on WSL but running "getdatafromosm.py" returned the following error. Do you have any idea to solve this?

(venv) username:~/images-to-osm$ chmod 400 getdatafromosm.py
(venv) username:~/images-to-osm$ python getdatafromosm.py
Traceback (most recent call last):
  File "getdatafromosm.py", line 101, in <module>
  File "getdatafromosm.py", line 19, in saveOsmData
  File "/home/username/venv/lib/python3.6/site-packages/overpy/__init__.py", line 150, in query
    return self.parse_xml(response)
  File "/home/username/venv/lib/python3.6/site-packages/overpy/__init__.py", line 235, in parse_xml
    self._handle_remark_msg(m.group("msg"))
  File "/home/username/venv/lib/python3.6/site-packages/overpy/__init__.py", line 107, in _handle_remark_msg
    raise exception.OverpassRuntimeError(msg=msg)
overpy.exception.OverpassRuntimeError: runtime error: Query timed out in "print" at line 17 after 559 seconds.
(venv) usename:~/images-to-osm$

Instead of running "chmod" to make the .py file acceptable, I also used "sudo python getdatafromosm.py" but it returned a different error.

(venv) username:~/images-to-osm$ sudo python getdatafromosm.py
[sudo] password for hideoshiraishi:
Traceback (most recent call last):
  File "getdatafromosm.py", line 5, in <module>
    import overpy

I suppose packages are installed and located under the visual envirnment correctly.

(venv) username:~/images-to-osm$ pip3 freeze
[...]
Keras==2.4.3
keras-nightly==2.5.0.dev2021032900
Keras-Preprocessing==1.1.2
[...]
overpy==0.6
[...]
tensorflow==2.5.0

(venv) username:~/images-to-osm$ python
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/username/venv/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']

My environment is:

Any suggestions are highly appreciated.

hideoshiraishi commented 3 years ago

I found a similar question in solved issue: Can't download requirement! wehre you replied to use Python 3.6 in virtual environment.

However, my windows-based environment (WSL) may not accept installing Ubuntu 17.1. Will try to find other solutions.