{"action":"opened","issue":{"url":"https://api.github.com/repos/geopandas/geopandas/issues/881","repository_url":"https://api.github.com/repos/geopandas/geopandas","labels_url":"https://api.github.com/repos/geopandas/geopandas/issues/881/labels{/name}","comments_url":"https://api.github.com/repos/geopandas/geopandas/issues/881/comments","events_url":"https://api.github.com/repos/geopandas/geopandas/issues/881/events","html_url":"https://github.com/geopandas/geopandas/issues/881","id":393444409,"node_id":"MDU6SXNzdWUzOTM0NDQ0MDk=","number":881,"title":"missing fiona.Env() in read_file()","user":{"login":"vhoofk","id":44055482,"node_id":"MDQ6VXNlcjQ0MDU1NDgy","avatar_url":"https://avatars0.githubusercontent.com/u/44055482?v=4","gravatar_id":"","url":"https://api.github.com/users/vhoofk","html_url":"https://github.com/vhoofk","followers_url":"https://api.github.com/users/vhoofk/followers","following_url":"https://api.github.com/users/vhoofk/following{/other_user}","gists_url":"https://api.github.com/users/vhoofk/gists{/gist_id}","starred_url":"https://api.github.com/users/vhoofk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vhoofk/subscriptions","organizations_url":"https://api.github.com/users/vhoofk/orgs","repos_url":"https://api.github.com/users/vhoofk/repos","events_url":"https://api.github.com/users/vhoofk/events{/privacy}","received_events_url":"https://api.github.com/users/vhoofk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-21T12:37:00Z","updated_at":"2018-12-21T12:37:00Z","closed_at":null,"author_association":"NONE","body":"It seems that `read_file()` is missing the `fiona.Env()` block that was recently added to `to_file()`.\r\n\r\nWithout this the `GDAL_DATA` environment variable is not set anymore since Fiona 1.8 as can be read in this issue thread:\r\n\r\n[https://github.com/Toblerity/Fiona/issues/673](https://github.com/Toblerity/Fiona/issues/673)\r\n\r\n> quote by @sgillies \r\n>\r\n> Here's the deal: Fiona 1.7.13 patches os.environ to set GDAL_DATA and PROJ_LIB when we called fiona.drivers() whether directly or indirectly. This is smelly and I've changed it. Fiona 1.8 no longer patches os.environ. Now you need to run code that will use CRS objects within a with fiona.Env(): block\r\n\r\nIn our case this leads to the following exception and GDAL warnings (only relevant part shown):\r\n\r\n```\r\nvenv35/lib/python3.5/site-packages/geopandas/geodataframe.py:443: in to_crs\r\n    geom = df.geometry.to_crs(crs=crs, epsg=epsg)\r\nvenv35/lib/python3.5/site-packages/geopandas/geoseries.py:304: in to_crs\r\n    proj_in = pyproj.Proj(self.crs, preserve_units=True)\r\n/opt/rh/rh-python35/root/usr/lib64/python3.5/site-packages/pyproj/__init__.py:358: in __new__\r\n    return _proj.Proj.__new__(self, projstring)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n\r\n>   ???\r\nE   RuntimeError: b'no arguments in initialization list'\r\n\r\n_proj.pyx:84: RuntimeError\r\n\r\n\r\nERROR 4: Unable to open EPSG support file gcs.csv.  Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.\r\nERROR 6: No translation for an empty SRS to PROJ.4 format is known.```\r\n\r\n"}}
{"actor":{"display_login":"vhoofk"}}