{"action":"closed","issue":{"url":"https://api.github.com/repos/conda/conda/issues/5062","repository_url":"https://api.github.com/repos/conda/conda","labels_url":"https://api.github.com/repos/conda/conda/issues/5062/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda/issues/5062/comments","events_url":"https://api.github.com/repos/conda/conda/issues/5062/events","html_url":"https://github.com/conda/conda/issues/5062","id":222118630,"number":5062,"title":"offline install, overriding channels","user":{"login":"neok-m4700","id":13423344,"avatar_url":"https://avatars1.githubusercontent.com/u/13423344?v=3","gravatar_id":"","url":"https://api.github.com/users/neok-m4700","html_url":"https://github.com/neok-m4700","followers_url":"https://api.github.com/users/neok-m4700/followers","following_url":"https://api.github.com/users/neok-m4700/following{/other_user}","gists_url":"https://api.github.com/users/neok-m4700/gists{/gist_id}","starred_url":"https://api.github.com/users/neok-m4700/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neok-m4700/subscriptions","organizations_url":"https://api.github.com/users/neok-m4700/orgs","repos_url":"https://api.github.com/users/neok-m4700/repos","events_url":"https://api.github.com/users/neok-m4700/events{/privacy}","received_events_url":"https://api.github.com/users/neok-m4700/received_events","type":"User","site_admin":false},"labels":[{"id":360414999,"url":"https://api.github.com/repos/conda/conda/labels/source:community","name":"source:community","color":"c2e0c6","default":false},{"id":16544530,"url":"https://api.github.com/repos/conda/conda/labels/type:bug","name":"type:bug","color":"b60205","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-04-17T11:47:42Z","updated_at":"2017-05-09T08:16:56Z","closed_at":"2017-05-09T08:16:56Z","body":"I have issues with `conda install --offline --override-channels -c file://<my-channel-url>`\r\n\r\n```python\r\nRuntimeError: EnforceUnusedAdapter called with url https://repo.continuum.io/pkgs/free/noarch/repodata.json.bz2\r\nThis command is using a remote connection in offline mode\r\n```\r\n\r\nWhen overriding channels in offline mode, why is https://repo.continuum.io used when fetching repo data ?\r\nCurrently, a simple way to avoid this error is to patch **conda/core/repodata.py**:\r\n\r\n```python\r\ndef fetch_repodata_remote_request(session, url, etag, mod_stamp):\r\n    # <...>\r\n    if 'repo.continuum.io' in url or url.startswith(\"file://\"):\r\n        filename = 'repodata.json.bz2'\r\n        headers['Accept-Encoding'] = 'identity'\r\n    else:\r\n        headers['Accept-Encoding'] = 'gzip, deflate, compress, identity'\r\n        headers['Content-Type'] = 'application/json'\r\n        filename = 'repodata.json'\r\n\r\n    # prevents offline error                                      <--- addition\r\n    if 'repo.continuum.io' in url and context.offline:          # <--- addition\r\n        return None                                             # <--- addition\r\n```\r\n\r\nIs this expected, and is there a better solution ?"}}
{"actor":{"display_login":"kalefranz"}}