rhiever / TwitterFollowBot

A Python bot that automates several actions on Twitter, such as following users and favoriting tweets.
GNU General Public License v3.0
1.31k stars 447 forks source link

[Errno 13] Don't have permission to open when opening bot #71

Closed xSLM closed 9 years ago

xSLM commented 9 years ago

On my computer i am an administrator and on checking the permissions i have read/write permissions and what not. When i tried opening this it says I don't have permission to open but I do and on checking it is not open in any other place on my computer. What do I do? Please Help!! This is my bot currently:

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot('***\Documents\TwitterFollowBot-master\TwitterFollowBot-master') my_bot.auto_unfollow_all_followers()

rhiever commented 9 years ago

When you run this line:

my_bot = TwitterBot('***\Documents\TwitterFollowBot-master\TwitterFollowBot-master')

You're telling the bot that the config.txt is the directory TwitterFollowBot-master. You likely want to change that line to:

my_bot = TwitterBot('***\Documents\TwitterFollowBot-master\TwitterFollowBot-master\config.txt')

or wherever your config.txt file is located.

xSLM commented 9 years ago

Thank You. That did fix that error, however i got this error i was actually getting before this. this is to do a value being out of the range of a list the text that came up is below:

Traceback (most recent call last): File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\mybot.py", line 4, in my_bot = TwitterBot('C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\config.txt') File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\TwitterFollowBotinit.py", line 42, in init self.bot_setup(config_file) File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\TwitterFollowBotinit.py", line 82, in bot_setup value = line[1].strip() IndexError: list index out of range

I have no clue why this is happening.

rhiever commented 9 years ago

Please copy and paste your config.txt here. You should anonymize your API key entries when posting it here.

On Friday, August 14, 2015, xSLM notifications@github.com wrote:

Aight I did that but i got this error i was actually getting before this. this is to do a value being out of the range of a list the text that came up is below:

Traceback (most recent call last): File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\mybot.py", line 4, in my_bot = TwitterBot('C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\config.txt') File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\TwitterFollowBotinit.py", line 42, in init self.bot_setup(config_file) File "C:\Users\sam\Documents\TwitterFollowBot-master\TwitterFollowBot-master\TwitterFollowBotinit.py", line 82, in bot_setup value = line[1].strip() IndexError: list index out of range

I have no clue why this is happening.

— Reply to this email directly or view it on GitHub https://github.com/rhiever/TwitterFollowBot/issues/71#issuecomment-131174572 .

Randal S. Olson, Ph.D. Postdoctoral Researcher, Institute for Biomedical Informatics University of Pennsylvania

E-mail: rso@randalolson.com | Twitter: @randal_olson https://twitter.com/randal_olson http://www.randalolson.com

xSLM commented 9 years ago

OAUTH_TOKEN: asdasd OAUTH_SECRET: asdasd CONSUMER_KEY: asdasd CONSUMER_SECRET: asdasd TWITTER_HANDLE: a handle ALREADY_FOLLOWED_FILE:already-followed.txt FOLLOWERS_FILE:followers.txt FOLLOWS_FILE:following.txt USERS_KEEP_FOLLOWING: USERS_KEEP_UNMUTED: USERS_KEEP_MUTED: FOLLOW_BACKOFF_MIN_SECONDS:10 FOLLOW_BACKOFF_MAX_SECONDS:60

rhiever commented 9 years ago

Are your keys on a separate line like that? If so, that's likely the issue. They should follow directly after the colon (:).

On Fri, Aug 14, 2015 at 1:41 PM, xSLM notifications@github.com wrote:

OAUTH_TOKEN: asdasd OAUTH_SECRET: asdasd CONSUMER_KEY: asdasd CONSUMER_SECRET: asdasd TWITTER_HANDLE: a handle ALREADY_FOLLOWED_FILE:already-followed.txt FOLLOWERS_FILE:followers.txt FOLLOWS_FILE:following.txt USERS_KEEP_FOLLOWING: USERS_KEEP_UNMUTED: USERS_KEEP_MUTED: FOLLOW_BACKOFF_MIN_SECONDS:10 FOLLOW_BACKOFF_MAX_SECONDS:60

— Reply to this email directly or view it on GitHub https://github.com/rhiever/TwitterFollowBot/issues/71#issuecomment-131191778 .

Randal S. Olson, Ph.D. Postdoctoral Researcher, Institute for Biomedical Informatics University of Pennsylvania

E-mail: rso@randalolson.com | Twitter: @randal_olson https://twitter.com/randal_olson http://www.randalolson.com

xSLM commented 9 years ago

nope :/

rhiever commented 9 years ago

Well, the gist of what's happening is that it's trying to parse your config.txt and it expects every line to have a : in it. Maybe there's an empty line at the beginning or the end of the config file?

xSLM commented 9 years ago

nope :/ no line anywhere

xSLM commented 9 years ago

here is what my config file looks like: image

rhiever commented 9 years ago

Is the USERS_KEEP_FOLLOWING line missing a colon or is it just covered in that picture?

If that's not it, please email me your config.txt (exactly as it is, with your keys and everything) so I can reproduce the error.

xSLM commented 9 years ago

user_keep_following does have a colon. I will email you the file in question

rhiever commented 9 years ago

Thanks for sending your file. I sent you back a working one. For folks looking for the solution to this in the future:

not

OAUTH_TOKEN:
dflkhdslkfhdaskjfhdskjfhdskafjlhdsf

not

OAUTH_TOKEN:dflkhdslkfhdaskjfhdskjfhdskafjlhdsf

OAUTH_SECRET:fhksdfhsfiuehieusgfies

e.g.,

USERS_KEEP_FOLLOWING:1234,4533,3435

not

USERS_KEEP_FOLLOWING:sally_example,jobBlog,southpark

We really need to document this in the README.