# 'Submission' object has no attribute 'comment' \[New User + Replit\]

**URL:** <https://discuss.python.org/t/submission-object-has-no-attribute-comment-new-user-replit/48211>\
**Category:** Python Help\
**Tags:** help\
**Created:** [March 11, 2024, 4:07pm UTC](https://discuss.python.org/t/submission-object-has-no-attribute-comment-new-user-replit/48211 "2024-03-11T16:07:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![crispybeatle](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/crispybeatle/32/18467_2.png) [@crispybeatle](https://discuss.python.org/u/crispybeatle)\
**Post date:** [March 11, 2024, 4:07pm UTC](https://discuss.python.org/t/submission-object-has-no-attribute-comment-new-user-replit/48211/1 "2024-03-11T16:07:09Z")

</div>

Hello everyone I’m making a Reddit bot but I keep having the error ‘Submission’ object has no attribute ‘comment’ I don’t know what’s causing it so that’s why I am asking here

Code:

```python
import praw
import os

from praw import reddit
client_id = os.environ['client_id']
client_secret = os.environ['client_secret']
username = os.environ['username']
password = os.environ['password']

reddit = praw.Reddit(
    client_id = client_id,
    client_secret = client_secret,
    username = username,
    password = password,
    user_agent = "<antiH-bot9000 1.0>"
)
def run():
    try:
        for comment in reddit.subreddit("crispybeatle").stream.submissions(skip_existing=True):
            print("new comment")
            comment.comment("h is bad")
            print("replied")
    except Exception as e:
      print(e)
      run()
run()

```

---

<div class="post-metadata">

**Author:** ![MegaIng](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/megaing/32/16162_2.png) [@MegaIng](https://discuss.python.org/u/MegaIng)\
**Post date:** [March 11, 2024, 4:14pm UTC](https://discuss.python.org/t/submission-object-has-no-attribute-comment-new-user-replit/48211/2 "2024-03-11T16:14:33Z")

</div>

I would suggest you carefully read the documentation. In this case, the method you want is called `reply`, not `comment`: [Submission - PRAW 7.7.1 documentation](https://praw.readthedocs.io/en/stable/code_overview/models/submission.html#praw.models.Submission.reply)

---

<div class="post-metadata">

**Author:** ![crispybeatle](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/crispybeatle/32/18467_2.png) [@crispybeatle](https://discuss.python.org/u/crispybeatle)\
**Post date:** [March 11, 2024, 4:20pm UTC](https://discuss.python.org/t/submission-object-has-no-attribute-comment-new-user-replit/48211/3 "2024-03-11T16:20:02Z")

</div>

Thank you so much!
