treee111 / wahooMapsCreator

Create maps for Wahoo device based on latest OSM maps
247 stars 25 forks source link

ERROR:! Error creating land.osm for tile #216

Closed swenak closed 1 year ago

swenak commented 1 year ago

Hi,

I'm trying using this tool, but still after downloading data obtaing same error:

(base) swenak@MBP ~ % python -m wahoomc cli -co malta -nbc -con -fp -v INFO:-------------------------------------------------------------------------------- INFO:-------------------------------------------------------------------------------- INFO:# check geofabrik.json file INFO:# Input country: malta. INFO:-------------------------------------------------------------------------------- INFO:+ Involved country: malta INFO:-------------------------------------------------------------------------------- INFO:# check land_polygons.shp file INFO:-------------------------------------------------------------------------------- INFO:# check countries .osm.pbf files INFO:+ Checking for old maps and remove them INFO:+ mapfile for malta: up-to-date. INFO:-------------------------------------------------------------------------------- INFO:# Filter tags from country osm.pbf files INFO:+ Filtering unwanted map objects out of map of malta INFO:+ Filter tags from country osm.pbf files: OK INFO:-------------------------------------------------------------------------------- INFO:# Generate land for each coordinate INFO:+ (tile 1 of 2) Coordinates: 137,100 ERROR:subprocess error output: ERROR:! Error creating land.osm for tile: 137,100 (base) swenak@MBP ~ %

I tryed few other arguments combinations, other country, but still same. With GUI I dont obtaint error, only it stop. I cant find nothing about this problem.

Thanks for helping.

swenak commented 1 year ago

So, I have some now information. After I upgrade to previous version 4.0.2, I obtain more information:

NFO:# Generate land for each coordinate INFO:+ (tile 1 of 2) Coordinates: 137,100 ERROR:subprocess:'OGR Python Bindings not installed.' ERROR:subprocess:'' ERROR:subprocess:'Installing GDAL depends on your platform. Information is available at:' ERROR:subprocess:'' ERROR:subprocess:'http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries' ERROR:subprocess:'' ERROR:subprocess:'For Debian-based systems:' ERROR:subprocess:'' ERROR:subprocess:'apt-get install python-gdal' ERROR:subprocess:'' ERROR:subprocess:'will usually suffice.' ERROR:subprocess:'' ERROR:! Error creating land.osm for tile: 137,100

So, based on this, I use:

pip3 install --upgrade pip pip3 install gdal==3.6.2


After that, frst problem was solved, but, but still problems:

INFO:+ Generate land for each coordinate: OK INFO:-------------------------------------------------------------------------------- INFO:# Generate sea for each coordinate INFO:+ (tile 1 of 2) Coordinates: 137,100 INFO:+ (tile 2 of 2) Coordinates: 138,100 INFO:+ Generate sea for each coordinate: OK INFO:-------------------------------------------------------------------------------- INFO:# Generate contour lines for each coordinate INFO:+ Coordinates: 137,100. (1 of 2) ERROR:subprocess error output: ERROR:Traceback (most recent call last): File "/Users/swenak/anaconda3/bin/phyghtmap", line 33, in sys.exit(load_entry_point('phyghtmap==2.23', 'console_scripts', 'phyghtmap')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/swenak/anaconda3/bin/phyghtmap", line 25, in importlib_load_entry_point return next(matches).load() ^^^^^^^^^^^^^^^^^^^^ File "/Users/swenak/anaconda3/lib/python3.11/importlib/metadata/init.py", line 202, in load module = import_module(match.group('module')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/swenak/anaconda3/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1206, in _gcd_import File "", line 1178, in _find_and_load File "", line 1149, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/Users/swenak/anaconda3/lib/python3.11/site-packages/phyghtmap-2.23-py3.11.egg/phyghtmap/main.py", line 17, in File "/Users/swenak/anaconda3/lib/python3.11/site-packages/phyghtmap-2.23-py3.11.egg/phyghtmap/hgt.py", line 18, in ImportError: cannot import name '_contour' from 'matplotlib' (/Users/swenak/anaconda3/lib/python3.11/site-packages/matplotlib/init.py)

treee111 commented 1 year ago

Hi! thanks for opening this issue.

  1. Based on your first message, it seams that you are not in your created Anaconda environment but in the standard "empty" Anaconda environment called base. Please follow the last step of here.

You can view the installed packages of your environment via conda list. There should be gdal and all others listed in the link above.

  1. have you tried creating maps without -con? creating contour lines needs some additional programs to be installed into the Anaconda environment. See here. If you have installed them into your environment base, you have to install them again.

For checking of successful phyghtmap installation, enter your environment and hit phyghtmap into the terminal. If there is a help output, you are right :-)

swenak commented 1 year ago

Hi,

thanks for answer and:

1) You have right, I was wrong. Now, it work correctly. 2) This is now OK too, same problem, installed in base, after reinstall, work without problems.

Thanks again, now it work, all was correctly downloaded.

S.