{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/rasterio/issues/415","labels_url":"https://api.github.com/repos/mapbox/rasterio/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/rasterio/issues/415/comments","events_url":"https://api.github.com/repos/mapbox/rasterio/issues/415/events","html_url":"https://github.com/mapbox/rasterio/issues/415","id":95300332,"number":415,"title":"Improve error messages when methods needing drivers are called out of context","user":{"login":"sgillies","id":33697,"avatar_url":"https://avatars.githubusercontent.com/u/33697?v=3","gravatar_id":"","url":"https://api.github.com/users/sgillies","html_url":"https://github.com/sgillies","followers_url":"https://api.github.com/users/sgillies/followers","following_url":"https://api.github.com/users/sgillies/following{/other_user}","gists_url":"https://api.github.com/users/sgillies/gists{/gist_id}","starred_url":"https://api.github.com/users/sgillies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgillies/subscriptions","organizations_url":"https://api.github.com/users/sgillies/orgs","repos_url":"https://api.github.com/users/sgillies/repos","events_url":"https://api.github.com/users/sgillies/events{/privacy}","received_events_url":"https://api.github.com/users/sgillies/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/rasterio/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mapbox/rasterio/milestones/34","html_url":"https://github.com/mapbox/rasterio/milestones/0.25","labels_url":"https://api.github.com/repos/mapbox/rasterio/milestones/34/labels","id":1186045,"number":34,"title":"0.25","description":null,"creator":{"login":"sgillies","id":33697,"avatar_url":"https://avatars.githubusercontent.com/u/33697?v=3","gravatar_id":"","url":"https://api.github.com/users/sgillies","html_url":"https://github.com/sgillies","followers_url":"https://api.github.com/users/sgillies/followers","following_url":"https://api.github.com/users/sgillies/following{/other_user}","gists_url":"https://api.github.com/users/sgillies/gists{/gist_id}","starred_url":"https://api.github.com/users/sgillies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgillies/subscriptions","organizations_url":"https://api.github.com/users/sgillies/orgs","repos_url":"https://api.github.com/users/sgillies/repos","events_url":"https://api.github.com/users/sgillies/events{/privacy}","received_events_url":"https://api.github.com/users/sgillies/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":13,"state":"open","created_at":"2015-06-29T20:52:04Z","updated_at":"2015-07-15T22:03:17Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-07-15T22:03:17Z","updated_at":"2015-07-15T22:03:17Z","closed_at":null,"body":"For example, if you call `reproject()` without a driver context like\r\n\r\n```python\r\nfrom rasterio.warp import reproject\r\n\r\nreproject(...)\r\n```\r\n\r\nYou will get the exception at https://github.com/mapbox/rasterio/blob/6b02fd304d10995cff818729abe47f28bd7a33b5/rasterio/_warp.pyx/#L260-262.\r\n\r\nThe exception should but doesn't tell you that you need to do this:\r\n\r\n```python\r\nimport rasterio\r\nfrom rasterio.warp import reproject\r\n\r\nwith rasterio.drivers():\r\n    reproject(...)\r\n```\r\n"}}