Git Product home page Git Product logo

Comments (25)

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

Is this still an issue of you?

from mendeley-api-python-example.

alicewriteswrongs avatar alicewriteswrongs commented on July 19, 2024

Yes, I gave up trying to get the API to work because I was having this error with the example Python code and a similar error with the JavaScript example code.

For the thing I'm trying to build this is not a problem, since I realized all of the information I want is contained in the BibTeX file I can export from Mendeley Desktop anyway.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

I have been able to recreate this and I am working on a fix.

from mendeley-api-python-example.

albuspensieve avatar albuspensieve commented on July 19, 2024

same here, when running Authorization code flow, I always get this error.

from mendeley-api-python-example.

alicewriteswrongs avatar alicewriteswrongs commented on July 19, 2024

@albus1993 As I said above I actually gave up on trying to get the API to work. I was trying to basically work with my own library, so I found it easier to export it to BibTeX and use a parsing library to import that into a database. If that fits your use case I would recommend trying it - there are BibTeX parsing libraries for most programming languages.

from mendeley-api-python-example.

tanimislam avatar tanimislam commented on July 19, 2024

I concur with this error. Any luck figuring out how to fix it? Perhaps an example using flask-oauthlib, with documentation shown here, would be most useful?

from mendeley-api-python-example.

jostheim avatar jostheim commented on July 19, 2024

what is the status of this?

from mendeley-api-python-example.

rg2410 avatar rg2410 commented on July 19, 2024

I had this problem too, any news if it has been solved? Many thanks.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

Apologies for not getting back to you on this. Can someone please share their code with me? e.g the exact steps that is causing this?

Missing the access token parameter means exactly that - maybe something is stripping it out? I'll take a look - Python is not my strongest language so I may need some help.

from mendeley-api-python-example.

rg2410 avatar rg2410 commented on July 19, 2024

I was running your catalogue example as it is: https://github.com/Mendeley/mendeley-api-python-catalog-example in python 2.7 and using the config file method.

Thanks.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

Are you using a virtualenv or just doing exactly what the instructions say?

from mendeley-api-python-example.

rg2410 avatar rg2410 commented on July 19, 2024

No environments, like the instructions.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

I've committed an update to the Mendeley dependency so can you try again. Perhaps create a virtualenv to ensure you have a dedicated environment. I'm struggling to replicate it but we will update some dependencies and see if any one of them will fix the issue as I research it in the background.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

Also can you run a 'pip freeze' and show me your output.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

And please clear your cookies and cache before you start.

from mendeley-api-python-example.

rg2410 avatar rg2410 commented on July 19, 2024

arrow==0.5.0
certifi==14.5.14
future==0.14.3
memoized-property==1.0.2
mendeley==0.3.0
oauthlib==0.7.2
python-dateutil==2.4.0
PyYAML==3.11
requests==2.5.1
requests-oauthlib==0.4.2
six==1.9.0

I've created an environment using conda and python2 for this and above is my 'pip freeze' result. Clear chache and cookies because of ipython notebook? I'm running it from a unix terminal in this case.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

Have you run pip install -r requirements.txt ?

I would expect to see something like this (mine):

Flask==0.10.1
Jinja2==2.7.3
MarkupSafe==0.23
PyYAML==3.11
Werkzeug==0.10
argparse==1.2.1
arrow==0.5.0
certifi==14.05.14
future==0.14.3
itsdangerous==0.24
memoized-property==1.0.2
mendeley==0.3.2
oauthlib==0.7.2
pyflakes==1.1.0
python-dateutil==2.4.0
requests==2.5.1
requests-oauthlib==0.4.2
six==1.9.0
wheel==0.24.0
wsgiref==0.1.2

from mendeley-api-python-example.

rg2410 avatar rg2410 commented on July 19, 2024

It's because I am referring to the mendeley-api-python-catalog-example (https://github.com/Mendeley/mendeley-api-python-catalog-example) and not the mendeley-api-python-example. I saw that the mendeley-api-python-example had the same error as I had with the mendeley-api-python-catalog-example and I was checking if anyone had the solution. Apologies if it's not the appropriate channel but the error is the same.
So my packages are in line with the required ones in the catalogue example.

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

OK I'm confused now. Can we shut this issue and move it to the correct one?

No need to apologise.

Are we discussing the Missing Token error or the state error?

from mendeley-api-python-example.

JimHokanson avatar JimHokanson commented on July 19, 2024

For what it is worth, the config example does not make clear that the {} are not required around the id and secret.

If loaded with the {} the config is loaded with the following format

{'clientId': {my_client_id: None}, 'clientSecret': {'my_secret_string': None}}

Importantly this leads to the Mendeley authentication containing a password that is now a dictionary {'my_secret_string': None} and the same with the password {my_client_id: None}

I have to run but eventually this leads to the "Missing access token parameter" error reported above. Perhaps this is the problem that people are encountering? ....

from mendeley-api-python-example.

rg2410 avatar rg2410 commented on July 19, 2024

@MendeleyStack - Sure, I will open an issue on mendeley-api-python-catalog-example. It's the missing token error.

@JimHokanson - I've seen that too and corrected so that the dictionary has only one entry. Still have the same missing token error.

from mendeley-api-python-example.

eenblam avatar eenblam commented on July 19, 2024

Same problem.

From the Werkzeug debugger (EDIT: from fetch_token in requests_oauthlib/oauth2_session.py):
r.text is a 401 with u'{"message":"Credentials are required to access this resource."}'
print(auth.username) => My Mendeley app id
print(auth.password) => My Mendeley client secret

@JimHokanson I removed the {} from config.yml.

I'm running from Python 2.7.11 in a new Anaconda environment, with requirements built with pip install -r requirements.txt.
pip freeze:
arrow==0.5.0
certifi==14.5.14
Flask==0.10.1
future==0.14.3
itsdangerous==0.24
Jinja2==2.7.3
MarkupSafe==0.23
memoized-property==1.0.2
mendeley==0.3.2
oauthlib==0.7.2
pyflakes==1.1.0
python-dateutil==2.4.0
PyYAML==3.11
requests==2.5.1
requests-oauthlib==0.4.2
six==1.9.0
Werkzeug==0.10

from mendeley-api-python-example.

kulharsh avatar kulharsh commented on July 19, 2024

I was facing the same issue for an hour or so today. I had been able to get the example to work last week or so. Finally I realized I made a stupid mistake, I did not update the secret after generating a new one. Complete waste of an hour.
image

from mendeley-api-python-example.

cvivar-a avatar cvivar-a commented on July 19, 2024

Hi, Can someone tell me how you fix the Missing access token parameter?

from mendeley-api-python-example.

Joyce-Stack avatar Joyce-Stack commented on July 19, 2024

Hey,

Have you got something like this in your config.yml file?

clientId: xxxx
clientSecret: fsfjasfkljf

from mendeley-api-python-example.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.