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

docs? getting started issue / UX #374

Open
BMaxV opened this issue Apr 12, 2024 · 1 comment
Open

docs? getting started issue / UX #374

BMaxV opened this issue Apr 12, 2024 · 1 comment

Comments

@BMaxV
Copy link

BMaxV commented Apr 12, 2024

Hello there,

I wanted to play around with the api a bit and thought I would use this module.

It doesn't really work for me out of the box, might be a "me" issue, but the documentation / errors don't immediately help fix this myself. So I thought I'd write a friendly issue to let you know, without any expectation that you fix this for me or anything.

:)


If I follow these getting started steps:

https://mastodonpy.readthedocs.io/en/stable/index.html

I get

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

this error, I'm not sure what's happening here.

I also found this guide:

https://martinheinz.dev/blog/86

Which mentions access tokens. Registering an application on my user profile on the web client and copy pasting that access token into something like this:

m = Mastodon(access_token="MYACCESSTOKEN", api_base_url="https://myinstance.websomething")
r = m.timeline("home",limit=10)
for x in r:
    print(x['id'])
    print(x['created_at'])
    print(x["content"])

works. So I'm assuming connection / login worked, I'm not sure how private the home feed is, but it should be personalized, so this is kind of what I was looking for.


So if you have the time and nothing better to do on this nice spring/summer weekend, which I hope you do, maybe take a look at those very first getting started steps and make sure they are more "idiotproof" for people like me. ;)

But what I have does work and it's using your software. So thank you for this software!

@codl
Copy link
Contributor

codl commented Apr 12, 2024

socket.gaierror: [Errno -3] Temporary failure in name resolution

I'm not sure what's happening here.

This means that your system's DNS was not working at the time, perhaps you were offline, or your ISP's DNS was having a bad day. If the other snippet worked then I guess the problem was fixed by then.

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

No branches or pull requests

2 participants