Bug 1177903 - IOError: proj data directory not found. Expecting it at: /usr/lib/python2.7/site-packages/mpl_toolkits/basemap/data
Summary: IOError: proj data directory not found. Expecting it at: /usr/lib/python2.7/s...
Keywords:
Status: CLOSED DUPLICATE of bug 1177319
Alias: None
Product: Fedora
Classification: Fedora
Component: python-basemap
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jef Spaleta
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-31 08:09 UTC by Ken
Modified: 2015-03-20 10:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-20 10:03:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ken 2014-12-31 08:09:18 UTC
Description of problem:

When I try to run a number of demos in /usr/share/doc/python-basemap-examples (eg : daynight.py), I get an error message :

IOError: proj data directory not found. Expecting it at: /usr/lib/python2.7/site-packages/mpl_toolkits/basemap/data

Also, there seems to be 2 copies of "pyproj" : one in the package "python-basemap", and one in "pyproj".

Version-Release number of selected component (if applicable):

python-basemap-1.0.7-4.fc21.i686

How reproducible:

Every time

Steps to Reproduce:
1. python /usr/share/doc/python-basemap-examples/daynight.py 


Actual results:

Traceback (most recent call last):
  File "/usr/share/doc/python-basemap-examples/daynight.py", line 2, in <module>
    from mpl_toolkits.basemap import Basemap
  File "/usr/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 30, in <module>
    from mpl_toolkits.basemap import pyproj
  File "/usr/lib/python2.7/site-packages/mpl_toolkits/basemap/pyproj.py", line 241, in <module>
    raise IOError(msg)
IOError: proj data directory not found. Expecting it at: /usr/lib/python2.7/site-packages/mpl_toolkits/basemap/data


Expected results:

Pretty pictures

Additional info:

Comment 1 Ken 2014-12-31 08:52:46 UTC
I tried changing /usr/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py :

< from mpl_toolkits.basemap import pyproj
---
> import pyproj

(and hiding /usr/lib/python2.7/site-packages/mpl_toolkits/basemap/pyproj*), but now I get :

Traceback (most recent call last):
  File "/usr/share/doc/python-basemap-examples/daynight.py", line 2, in <module>
    from mpl_toolkits.basemap import Basemap
  File "/usr/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 141, in <module>
    epsgf = open(os.path.join(basemap_datadir,'epsg'))
IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/mpl_toolkits/basemap/data/epsg'




So, there seems to be 2 copies of the "epsg" data: one in the package python-basemap-data (at /usr/share/basemap/epsg), and one in proj-epsg (at /usr/share/proj/epsg)



So fix that in /usr/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py

< epsgf = open(os.path.join(basemap_datadir,'epsg'))
---
> epsgf = open('/usr/share/proj/epsg')

...


but then it complains :

Traceback (most recent call last):
  File "/usr/share/doc/python-basemap-examples/daynight.py", line 10, in <module>
    map = Basemap(projection='mill',lon_0=180)
  File "/usr/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 1080, in __init__
    self._readboundarydata('gshhs',as_polygons=True)
  File "/usr/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 1193, in _readboundarydata
    raise IOError(msg)
IOError: Unable to open boundary dataset file. Only the 'crude', 'low',
'intermediate' and 'high' resolution datasets are installed by default.
If you are requesting a 'full' resolution dataset, you may need to
download and install those files separately
(see the basemap README for details).




... dunno what the fix is exactly, but a workaround:

export BASEMAPDATA=/usr/share/basemap

Comment 2 Elliott Sales de Andrade 2015-01-13 09:26:51 UTC
Dupe of Bug 1177052.

Comment 3 Jos de Kloe 2015-03-20 10:03:25 UTC

*** This bug has been marked as a duplicate of bug 1177319 ***


Note You need to log in before you can comment on or make changes to this bug.