trailbehind / DeepOSM

Train a deep learning net with OpenStreetMap features and satellite imagery.
MIT License
1.32k stars 182 forks source link

gdal version mismatch? #74

Closed jmontrose closed 7 years ago

jmontrose commented 7 years ago

Looks like the gdal swig binary is out of sync with newer python bindings? I'm running this inside the non-gpu docker image. I gather the GNM bits are relatively new, so it makes sense that they'd get hit.

root@f059367028e3:/DeepOSM# python ./bin/create_training_data.py 
Traceback (most recent call last):
  File "./bin/create_training_data.py", line 6, in <module>
    from src.training_data import download_and_serialize
  File "/DeepOSM/src/training_data.py", line 10, in <module>
    from osgeo import gdal
  File "/usr/local/lib/python2.7/dist-packages/osgeo/gdal.py", line 86, in <module>
    from gdalconst import *
  File "/usr/local/lib/python2.7/dist-packages/osgeo/gdalconst.py", line 148, in <module>
    OF_GNM = _gdalconst.OF_GNM
AttributeError: 'module' object has no attribute 'OF_GNM'

Also, I've tried going straight to https://hub.docker.com/r/homme/gdal/ and I can't reproduce there.

I'm wondering if one of the apt-get installs brought along an out-of-date gdal binary?

Here are a few more files:

root@f059367028e3:/usr/local/lib/python2.7/dist-packages# ls -lha /usr/local/lib/libgdal*
-rw-r--r-- 1 root root 288M Oct 28 11:24 /usr/local/lib/libgdal.a
-rwxr-xr-x 1 root root 1.6K Oct 28 11:24 /usr/local/lib/libgdal.la
lrwxrwxrwx 1 root root   17 Oct 28 11:24 /usr/local/lib/libgdal.so -> libgdal.so.20.1.0
lrwxrwxrwx 1 root root   17 Oct 28 11:24 /usr/local/lib/libgdal.so.20 -> libgdal.so.20.1.0
-rwxr-xr-x 1 root root 116M Oct 28 11:24 /usr/local/lib/libgdal.so.20.1.0
root@f059367028e3:/usr/local/lib/python2.7/dist-packages# ls -lha *gdal*
-rw-r--r-- 1 root staff 128 Oct 28 10:15 gdal.py
-rw-r--r-- 1 root staff 244 Oct 28 11:25 gdal.pyc
-rw-r--r-- 1 root staff 143 Oct 28 10:15 gdalconst.py
-rw-r--r-- 1 root staff 274 Oct 28 11:25 gdalconst.pyc
-rw-r--r-- 1 root staff 147 Oct 28 10:15 gdalnumeric.py
-rw-r--r-- 1 root staff 279 Oct 28 11:25 gdalnumeric.pyc
andrewljohnson commented 7 years ago

Thanks for opening the issue, I get the same thing on my mac.

Are you able to do a PR to fix this?

On Mon, Feb 13, 2017 at 1:35 PM, Jesse Montrose notifications@github.com wrote:

Looks like the gdal swig binary is out of sync with newer python bindings? I'm running this inside the non-gpu docker image. I gather the GNM bits are relatively new, so it makes sense that they'd get hit.

root@f059367028e3:/DeepOSM# python ./bin/create_training_data.py Traceback (most recent call last): File "./bin/create_training_data.py", line 6, in from src.training_data import download_and_serialize File "/DeepOSM/src/training_data.py", line 10, in from osgeo import gdal File "/usr/local/lib/python2.7/dist-packages/osgeo/gdal.py", line 86, in from gdalconst import * File "/usr/local/lib/python2.7/dist-packages/osgeo/gdalconst.py", line 148, in OF_GNM = _gdalconst.OF_GNM AttributeError: 'module' object has no attribute 'OF_GNM'

ā€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/trailbehind/DeepOSM/issues/74, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbzf9vWKHguYxl-XUzWPWm6r_ygLzZTks5rcMyigaJpZM4L_wHu .

jmontrose commented 7 years ago

I don't know how to fix it yet, still finding my way around. Any guidance? I'm happy to poke around some more!

andrewljohnson commented 7 years ago

Fixed just now with dc89093

jmontrose commented 7 years ago

That fixed it, thanks! šŸ‘