{"action":"created","issue":{"url":"https://api.github.com/repos/sigmavirus24/requests-toolbelt/issues/121","labels_url":"https://api.github.com/repos/sigmavirus24/requests-toolbelt/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/sigmavirus24/requests-toolbelt/issues/121/comments","events_url":"https://api.github.com/repos/sigmavirus24/requests-toolbelt/issues/121/events","html_url":"https://github.com/sigmavirus24/requests-toolbelt/issues/121","id":123182876,"number":121,"title":"ImportError: cannot import name connection","user":{"login":"phdegnan","id":16374715,"avatar_url":"https://avatars.githubusercontent.com/u/16374715?v=3","gravatar_id":"","url":"https://api.github.com/users/phdegnan","html_url":"https://github.com/phdegnan","followers_url":"https://api.github.com/users/phdegnan/followers","following_url":"https://api.github.com/users/phdegnan/following{/other_user}","gists_url":"https://api.github.com/users/phdegnan/gists{/gist_id}","starred_url":"https://api.github.com/users/phdegnan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phdegnan/subscriptions","organizations_url":"https://api.github.com/users/phdegnan/orgs","repos_url":"https://api.github.com/users/phdegnan/repos","events_url":"https://api.github.com/users/phdegnan/events{/privacy}","received_events_url":"https://api.github.com/users/phdegnan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-20T20:58:51Z","updated_at":"2015-12-20T23:00:00Z","closed_at":null,"body":"This is related to https://github.com/sigmavirus24/requests-toolbelt/issues/82 - which appeared to have been fixed by 0.5.1 - but perhaps some of my installed versions are old. Installation and system details are below. \r\n\r\nI'm trying to get the MG-RAST API running (https://github.com/MG-RAST/MG-RAST-Tools). I had to install requests-toolbelt which seemed to go fine:\r\n```\r\n$ easy_install --prefix=/data/software/PyM requests-toolbelt\r\nCreating /data/software/PyM/lib/python2.7/site-packages/site.py\r\nSearching for requests-toolbelt\r\nReading https://pypi.python.org/simple/requests-toolbelt/\r\nBest match: requests-toolbelt 0.5.1\r\nDownloading https://pypi.python.org/packages/source/r/requests-toolbelt/requests-toolbelt-0.5.1.tar.gz#md5=580ab16edf9d1afad883623ba7873af9\r\nProcessing requests-toolbelt-0.5.1.tar.gz\r\nWriting /tmp/easy_install-Nf_fke/requests-toolbelt-0.5.1/setup.cfg\r\nRunning requests-toolbelt-0.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Nf_fke/requests-toolbelt-0.5.1/egg-dist-tmp-bonI2S\r\nno previously-included directories found matching 'docs/_build'\r\nwarning: no previously-included files matching '*.py[cdo]' found anywhere in distribution\r\nwarning: no previously-included files matching '__pycache__' found anywhere in distribution\r\nwarning: no previously-included files matching '*.so' found anywhere in distribution\r\nwarning: no previously-included files matching '*.pyd' found anywhere in distribution\r\nzip_safe flag not set; analyzing archive contents...\r\nAdding requests-toolbelt 0.5.1 to easy-install.pth file\r\n\r\nInstalled /data/software/PyM/lib/python2.7/site-packages/requests_toolbelt-0.5.1-py2.7.egg\r\nProcessing dependencies for requests-toolbelt\r\nFinished processing dependencies for requests-toolbelt\r\n```\r\n\r\nPath variable updates were added for local directories and MG-RAST-Tools:\r\n```\r\nexport PYTHONPATH=\"/data/software/PyM/lib/python2.7/site-packages/:/data/software/MG-RAST-Tools/tools/lib/\"\r\nexport PERL5LIB=\"/data/software/PM/share/perl/5.18.2:/data/software/PM/lib/perl/5.18.2/:/data/software/MG-RAST-Tools/tools/lib/\"\r\n```\r\n\r\nBut when I run the main script I get the following error message:\r\n```\r\n$ ./tools/bin/mg-download.py -h\r\nTraceback (most recent call last):\r\n  File \"./tools/bin/mg-download.py\", line 7, in <module>\r\n    from mglib import *\r\n  File \"/data/software/MG-RAST-Tools/tools/lib/mglib.py\", line 14, in <module>\r\n    from requests_toolbelt import MultipartEncoder\r\n  File \"build/bdist.linux-x86_64/egg/requests_toolbelt/__init__.py\", line 12, in <module>\r\n    \r\n  File \"build/bdist.linux-x86_64/egg/requests_toolbelt/adapters/__init__.py\", line 12, in <module>\r\n    \r\n  File \"build/bdist.linux-x86_64/egg/requests_toolbelt/adapters/ssl.py\", line 14, in <module>\r\n    \r\n  File \"build/bdist.linux-x86_64/egg/requests_toolbelt/_compat.py\", line 20, in <module>\r\nImportError: cannot import name connection\r\n```\r\nPer #82 my system installation is thus:\r\n\r\n```\r\n$  lsb_release -a \r\nNo LSB modules are available.\r\nDistributor ID:\tUbuntu\r\nDescription:\tUbuntu 14.04.3 LTS\r\nRelease:\t14.04\r\n\r\n$ pip list\r\napt-xapian-index (0.45)\r\nargparse (1.2.1)\r\nbiom-format (1.3.1)\r\nchardet (2.0.1)\r\ncogent (1.5.3)\r\ncolorama (0.2.5)\r\nconfigobj (4.7.2)\r\ncutadapt (1.2.1)\r\ndocutils (0.11)\r\nemperor (0.9.3)\r\ngdata (2.0.18)\r\nhtml5lib (0.999)\r\nJinja2 (2.7.2)\r\nLandscape-Client (14.12)\r\nMarkupSafe (0.18)\r\nmatplotlib (1.3.1)\r\nmpi4py (1.3.1)\r\nnose (1.3.1)\r\nnumpy (1.7.1)\r\nopenpyxl (1.7.0)\r\nPAM (0.4.2)\r\nPillow (2.3.0)\r\npip (1.5.4)\r\nprettytable (0.7.2)\r\npycrypto (2.6.1)\r\npycups (1.9.66)\r\npycurl (7.19.3)\r\nPygments (1.6)\r\npygobject (3.12.0)\r\nPyNAST (1.2)\r\npyOpenSSL (0.13)\r\npyparsing (2.0.1)\r\npyqi (0.3.1)\r\npyserial (2.6)\r\npysmbc (1.0.14.1)\r\npython-apt (0.9.3.5ubuntu2)\r\npython-dateutil (1.5)\r\npython-debian (0.1.21-nmu2ubuntu2)\r\npytz (2012c)\r\nqcli (0.1.0)\r\nreportlab (3.0)\r\nrequests (2.2.1)\r\nrequests-toolbelt (0.5.1)\r\nroman (2.0.0)\r\nsetuptools (3.3)\r\nsix (1.5.2)\r\nSphinx (1.2.2)\r\nssh-import-id (3.21)\r\nsystem-service (0.1.6)\r\ntax2tree (1.0)\r\nTwisted-Core (13.2.0)\r\nurllib3 (1.7.1)\r\nwheel (0.24.0)\r\nwsgiref (0.1.2)\r\nzope.interface (4.0.5)\r\n\r\n$ pip show requests\r\n---\r\nName: requests\r\nVersion: 2.2.1\r\nLocation: /usr/lib/python2.7/dist-packages\r\nRequires: \r\n\r\n\r\n$ pip show requests-toolbelt\r\n---\r\nName: requests-toolbelt\r\nVersion: 0.5.1\r\nLocation: /data/software/PyM/lib/python2.7/site-packages/requests_toolbelt-0.5.1-py2.7.egg\r\nRequires: requests\r\n\r\n```\r\nI haven't tried updating requests based on pbkhrv's in #82 that it broke pip.  Any suggestions would be great. \r\nBest, \r\nPatrick\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sigmavirus24/requests-toolbelt/issues/comments/166161831","html_url":"https://github.com/sigmavirus24/requests-toolbelt/issues/121#issuecomment-166161831","issue_url":"https://api.github.com/repos/sigmavirus24/requests-toolbelt/issues/121","id":166161831,"user":{"login":"sigmavirus24","id":240830,"avatar_url":"https://avatars.githubusercontent.com/u/240830?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmavirus24","html_url":"https://github.com/sigmavirus24","followers_url":"https://api.github.com/users/sigmavirus24/followers","following_url":"https://api.github.com/users/sigmavirus24/following{/other_user}","gists_url":"https://api.github.com/users/sigmavirus24/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmavirus24/subscriptions","organizations_url":"https://api.github.com/users/sigmavirus24/orgs","repos_url":"https://api.github.com/users/sigmavirus24/repos","events_url":"https://api.github.com/users/sigmavirus24/events{/privacy}","received_events_url":"https://api.github.com/users/sigmavirus24/received_events","type":"User","site_admin":false},"created_at":"2015-12-20T23:00:00Z","updated_at":"2015-12-20T23:00:00Z","body":"@phdegnan are you going to send a PR?"}}