Open carolmb opened 1 year ago
What specific Mastodon instance (server URL) is this happening with? Did it previously work with that instance, or has it never worked with that instance? Has anything changed on your system since the last time the code worked for you?
When I used the instance for the first time, I was setting the values directly on the code, so it worked with no problems. When I refactored the code then the errors appeared.
I discovered what was wrong but the message error did not help (the one I related previously).
About my mistakes:
I tried two different approaches to initialize a Mastodon object, both were incorrect.
The first problem was how I was reading the file with the cliend_id
, cliend_secret
, access_token
, and api_base_url
strings.
Once I removed the unnecessary "\n" at the end of the args, it worked well.
The other problem was about giving a filename as an argument to Mastodon init I was trying to use as follows:
api = Mastodon(client_id='filename-with-id-secret-token-url.txt')
based on its documentation _"If a file is given as clientid, client ID, secret and base url are read from that file." Do you know how this argument should be used to work correctly?
In both cases, the error only occurred when I was trying to use the object, for instance, calling api.account_lookup
.
Let me actually reopen this - I've noticed myself that the error message can be very misleading, and should be fixed in some way.
Hello. I've been using the API these days, but since yesterday the following error is occurring and I can't find any record of it.
Since I'm not familiar with where exactly I should ask about this kind of stuff if there is a better place, let me know. I can delete this one and repost where it is more suitable.
Thank you in advance.
More information: I'm using python (3.11.3) and mastodon.py (1.8.1).
I also asked the same here. I'm not sure if it is a problem from mastodon.py or server side.