ozak / georasters

GeoRasters is a Python module that provides a fast and flexible tool to work with GIS raster files.
GNU General Public License v3.0
198 stars 36 forks source link

Import Issue in georasters #23

Closed kritiksoman closed 6 years ago

kritiksoman commented 6 years ago

(geo_env) dells-MacBook-Air:georasters dell$ python Python 2.7.14 |Intel Corporation| (default, Oct 16 2017, 10:29:14) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. Intel(R) Distribution for Python is brought to you by Intel Corporation. Please check out: https://software.intel.com/en-us/python-distribution

import georasters Traceback (most recent call last): File "", line 1, in File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/georasters/init.py", line 3, in from .georasters import get_geo_info, map_pixel, map_pixel_inv, aggregate, create_geotiff, align_rasters, \ File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/georasters/georasters.py", line 44, in from rasterstats import zonal_stats File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/rasterstats-0.11.0-py2.7.egg/rasterstats/init.py", line 2, in File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/rasterstats-0.11.0-py2.7.egg/rasterstats/main.py", line 8, in File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/rasterstats-0.11.0-py2.7.egg/rasterstats/io.py", line 13, in BufferedIOBase deals with buffering on a raw byte stream (RawIOBase). Its ImportError: cannot import name ReadingError import georaster Traceback (most recent call last): File "", line 1, in ImportError: No module named georaster import georasters Traceback (most recent call last): File "", line 1, in File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/georasters/init.py", line 3, in from .georasters import get_geo_info, map_pixel, map_pixel_inv, aggregate, create_geotiff, align_rasters, \ File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/georasters/georasters.py", line 44, in from rasterstats import zonal_stats File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/rasterstats-0.11.0-py2.7.egg/rasterstats/init.py", line 2, in File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/rasterstats-0.11.0-py2.7.egg/rasterstats/main.py", line 8, in File "/Volumes/MacBookData/dell/anaconda3/envs/geo_env/lib/python2.7/site-packages/rasterstats-0.11.0-py2.7.egg/rasterstats/io.py", line 13, in BufferedIOBase deals with buffering on a raw byte stream (RawIOBase). Its ImportError: cannot import name ReadingError

ozak commented 6 years ago

@realdealcoder thanks for bringing this to my attention. How did you install georasters? pip or conda. The conda version may not be up to date to work on py3, which I think is the issue. Please uninstall and install using pip install georasters. I'll try to upgrade the conda version asap. Let me know if this works.

kritiksoman commented 6 years ago

I had installed using conda and am using python version : 3.6.3.final.0 I tried pip install georasters, but that is also giving the same error. I am not sure, but maybe this has something to do with this :https://github.com/perrygeo/python-rasterstats/issues/140

ozak commented 6 years ago

Just checked in a simple environment I have with py3.5 where

rasterstats               0.12.0                    <pip>
fiona                     1.7.11                   py35_0    conda-forge
shapely                   1.6.3                    py35_0    conda-forge

and it works perfectly fine. I wonder if it is a py3.6 issue? I'll try to create an environment with 3.6 to check.

kritiksoman commented 6 years ago

I updated the rasterstats from 0.11 to 0.12, and I am able to import georasters. Thanks for the help.