Linus2punkt0 / bluesky-crossposter

An app for crossposting your posts from bluesky to twitter and mastodon
108 stars 23 forks source link

Error when checking replies on post #4

Closed nathanwentworth closed 1 year ago

nathanwentworth commented 1 year ago

Hello! I got this set up with all of my keys, and everything is running the most up to date version, however I'm getting an error on line 65. Seems like it's failing when it's hitting my most-recently posted reply.

Traceback (most recent call last):
  File "crosspost.py", line 366, in <module>
    posts = getPosts()
  File "crosspost.py", line 67, in getPosts
    replyToUser = feed_view.reply.parent.author.handle
AttributeError: 'NoneType' object has no attribute 'parent'

any help would be appreciated! Thank you for making this!

Linus2punkt0 commented 1 year ago

Hello! I will take a look. Is it possible for you to send me the URI for the post causing the error? If you add print(feed_view.post.uri) just above the line giving the error it should hopefully print the URI just before failing.

nathanwentworth commented 1 year ago

yes! this is the uri: at://did:plc:ggbnfrk64vwppek4zumorfbc/app.bsky.feed.post/3k4ue2f2lty2t

Linus2punkt0 commented 1 year ago

Okay, it seems the issue was caused by some weirdness resulting from the original post in the thread being deleted. I've reworked the code to hopefully deal with any similar problems going forwards! Let me know if everything seems to be working okay with the new version.

nathanwentworth commented 1 year ago

Great that fixed it!! Thank you!!!