-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
Description
Traceback (most recent call last):
File "main.py", line 160, in replyComment
comment_obj = user.comment_by_id(commentID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/lib/python3.11/site-packages/scratchattach/site/user.py", line 730, in comment_by_id
results = list(filter(lambda x : str(x.id) == str(comment_id), page_content))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
When I'm replying using the ID of a root-level comment it works fine, but as soon as I attempt to reply using the ID of a reply this error is thrown.
I can't even try replying to the comment with its parent, as I can't even get the comment_obj.
Here's more of my code:
def replyComment(comment, user, commentID):
user = session.connect_user(user)
comment_obj = user.comment_by_id(commentID)
comment_obj.reply(comment)
return "Comment replied to successfully!"