Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: $ operator is invalid for atomic vectors: Problem with Access Token #178

Open
adapkus opened this issue Apr 12, 2022 · 5 comments
Open
Labels

Comments

@adapkus
Copy link

adapkus commented Apr 12, 2022

When trying to use any function that requires the Spotify access token, I get the following error in R:

get_my_profile('BQAutrEqv1HNUuVJB7gRsIkih53KbntAJeeAAc7JDEwbRpQ3Z1PuVecf9zdjgg2StJQAU_LAMwjLI1xBJ4d1ZKa371_VE77FuAJY5KhnjfIrPqNL4LzSWtj2cXPpsbqspzuWls8wh8vn522mgE1oTFhm7Y9rBDAPML2****')
Error: $ operator is invalid for atomic vectors
Request failed [ERROR]. Retrying in 1.3 seconds...
Error: $ operator is invalid for atomic vectors
Request failed [ERROR]. Retrying in 2.7 seconds...
Error: $ operator is invalid for atomic vectors

I am using the access token I retrieved through the Authorization Flow and here is the json data for it:

{"access_token":"BQAutrEqv1HNUuVJB7gRsIkih53KbntAJeeAAc7JDEwbRpQ3Z1PuVecf9zdjgg2StJQAU_LAMwjLI1xBJ4d1ZKa371_VE77FuAJY5KhnjfIrPqNL4LzSWtj2cXPpsbqspzuWls8wh8vn522mgE1oTFhm7Y9rBDAPML2****","token_type":"Bearer","expires_in":3600,"refresh_token":"AQCvFU5TL_ZejNdOe-t_2uHym2FllH3DqKVrveh3RdcvcP5B4Qx-cmHyefnR-tcpiosZkyA0yUhD_9MVsL4Gmf5IZw8V9UMwpyMfT6UG0mr_844B9h4b0nqztM6D1o6****","scope":"playlist-read-private user-read-private"}

I added the **** to the end of the tokens just to maybe protect some data.

@lindsaypoirier
Copy link

I'm running into this exact same issue.

@watch22
Copy link

watch22 commented Aug 22, 2022

Same here

@antaldaniel antaldaniel added question and removed bug labels Aug 22, 2022
@antaldaniel
Copy link
Collaborator

I think that it would be very useful if somebody could elaborate a bit more on the problem, and produce a replicable error. At the very least somebody should report to what does this error message refer to:

Error: $ operator is invalid for atomic vectors
(What was the exact call that resulted in this invalid $ call? Aparantely something that should have received a list or a data.frame received an atomic vector, but what?)

I don't think that this is a program code bug, nevertheless, it would be good to give users a more meaningful error message.

@watch22
Copy link

watch22 commented Aug 22, 2022

Hi Daniel,

Here is an example of a command that results in this error:

> get_my_playlists(authorization = access_token)
Error: $ operator is invalid for atomic vectors
Request failed [ERROR]. Retrying in 1.9 seconds...
Error: $ operator is invalid for atomic vectors
Request failed [ERROR]. Retrying in 1.7 seconds...
Error: $ operator is invalid for atomic vectors

I created a new client and secret ID and generated a new authorisation token (making sure I added the localhost url as described in the package's tutorial) , but I keep getting the same error.

@schiekiera
Copy link

Same here. Did anyone find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants