Calw
Calw

Reputation: 45

Why is the object called "module" not callable?

I'm trying to make a bot that replies to comments on Reddit but I've been getting this error and I don't know what to do

this is the error I get:

Traceback (most recent call last):
  File "F:\Python\Reddit Bot\bot.py", line 3, in <module>
    r = praw.reddit(user_agent = "Replyer Bot")
TypeError: 'module' object is not callable

I've imported praw, time and random separated by colons if that helps

Upvotes: 1

Views: 740

Answers (1)

TwistedSim
TwistedSim

Reputation: 2030

You have a typo in r = praw.reddit(user_agent = "Replyer Bot"). Use:

r = praw.Reddit(user_agent = "Replyer Bot")

Take a look at the Quick Start page

Upvotes: 2

Related Questions