Closed cameronneylon closed 11 years ago
Interesting- it works fine on my end (on Python 2.7.3). I'll try a new virtualenv.
I think the difference is in requests version. This was addressed by https://github.com/scholrly/orcid-python/pull/2, so if you install from GitHub (pip install -e git+https://github.com/scholrly/orcid-python#egg=order-python-dev
) I imagine it will work. I'll update the requirement and push the bugfix to PyPi soon.
Another way to to confirm that's the case- install an earlier version of requests (maybe pip install -U requests==1.0.4
) and see whether it works. If not, please reopen this issue and we'll get it sorted out.
Thanks for this and thanks for the wrapper as well! Now it's working again it's great.
Just to note, that the dev version does work as above but the suggested version of requests does not. This is because the relevant change to the requests API is between v 0.x and 1.x as per http://docs.python-requests.org/en/latest/api/#migrating-to-1-x
So the following works:
vagrant@iPythonNotebook:~$ sudo pip install requests==0.14.2
vagrant@iPythonNotebook:~$ sudo pip install orcid-python
vagrant@iPythonNotebook:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import orcid
>>> orcid.get('0000-0002-0068-716X')
<Author Cameron Neylon, ORCID 0000-0002-0068-716X>
>>>
as does:
vagrant@iPythonNotebook:~$ sudo pip install -e git+https://github.com/scholrly/orcid-python#egg=order-python-dev
vagrant@iPythonNotebook:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import orcid
>>> orcid.get('0000-0002-0068-716X')
<Author Cameron Neylon, ORCID 0000-0002-0068-716X>
>>> exit()
Ah, of course. Thanks Cameron! On May 26, 2013 6:56 AM, "Cameron Neylon" notifications@github.com wrote:
Thanks for this and thanks for the wrapper as well! Now it's working again it's great.
Just to note, that the dev version does work as above but the suggested version of requests does not. This is because the relevant change to the requests API is between v 0.x and 1.x as per http://docs.python-requests.org/en/latest/api/#migrating-to-1-x
So the following works:
vagrant@iPythonNotebook:~$ sudo pip install requests==0.14.2 vagrant@iPythonNotebook:~$ sudo pip install orcid-python vagrant@iPythonNotebook:~$ python Python 2.7.3 (default, Apr 20 2012, 22:39:59) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import orcid orcid.get('0000-0002-0068-716X') <Author Cameron Neylon, ORCID 0000-0002-0068-716X>
as does:
vagrant@iPythonNotebook:~$ sudo pip install -e git+https://github.com/scholrly/orcid-python#egg=order-python-dev vagrant@iPythonNotebook:~$ python Python 2.7.3 (default, Apr 20 2012, 22:39:59) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import orcid orcid.get('0000-0002-0068-716X') <Author Cameron Neylon, ORCID 0000-0002-0068-716X> exit()
— Reply to this email directly or view it on GitHubhttps://github.com/scholrly/orcid-python/issues/3#issuecomment-18461341 .
I'm really confused by this. I had everything working just fine, just as it was supposed to according to the readme and then I somehow managed to break something. So on a clean VM running Python 2.7 I get the following and this is now what happens regardless of the system I'm running. As I say, it was working just fine which is what is confusing me: