r/pythonforengineers • u/Enfulio • May 24 '19
Problem running step 1 script
Getting this error:
Traceback (most recent call last):
File "C:\Users\username\Dropbox\Coding\Reddit_bot.py", line 12, in <module>
reddit.login(username, password)
AttributeError: 'Reddit' object has no attribute 'login'
Anyone know how to fix this?
3
Upvotes
1
u/pielord13 May 24 '19
Some libraries have a pattern of something like this:
From Reddit import reddit
Reddit.login(UN,PW)
Check to see if something like that works
If not can you provide a link to the library you are using?
*i am on mobile and i do not know if i can format the code in comments
1
u/[deleted] May 24 '19 edited May 24 '19
I haven't gone through these directions yet, and I'm still new to Python, but it looks like maybe you didn't import the Reddit library correctly? It's saying it doesn't have a "login" attribute/function/method/whatever to send the username and password arguments to.