Closed thermike closed 8 years ago
sudo pip install --upgrade requests your welcome
I'd tried that but the error still occurred.
I was able to fix it with the following, which wraps the exceptions and converts it to a string so that it can be concatenated.
except Exception as e:
print("Could not connect to TwitterAPI - are your credentials correct?")
print("Exception: " + str(e))
check your credentials
On Thu, Apr 21, 2016 at 2:33 PM, thermike notifications@github.com wrote:
I'd tried that but the error still occurred.
I was able to fix it with the following, which wraps the exceptions and converts it to a string so that it can be concatenated.
except Exception as e: print("Could not connect to TwitterAPI - are your credentials correct?") print("Exception: " + str(e))
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/kurozael/twitter-contest-bot/issues/13#issuecomment-213056495
My credentials are definitely correct. I've tested them with the vanilla API Auth test script provided through the TwitterAPI suite and I don't get any errors.
However I get errors with this script, saying creds might be wrong, but if I make the proposed change, then the error is raised but the script continues to run and I see Tweets added to the queue and get retweeted.
What os are you running? If you don't mind please run these commands sudo apt-get update && sudo apt-get upgrade sudo git clone https://github.com/greg5678/twitter-contest.git cd twitter-contest sudo apt-get install python-pip sudo pip3 install TwitterAPI && sudo pip3 install apscheduler
sudo pip3 install setuptools --upgrade
sudo pip3 install --upgrade requests sudo mv config.json.example config.json now make the values correspond to your Twitter API credentials sudo main.py
hope it works now!
I made a mistake on the last line. It should be sudo python3 main.py
On Thu, Apr 21, 2016 at 5:23 PM, Greg McSwagger gregmcswagger@gmail.com wrote:
What os are you running? If you don't mind please run these commands sudo apt-get update && sudo apt-get upgrade sudo git clone https://github.com/greg5678/twitter-contest.git cd twitter-contest sudo apt-get install python-pip sudo pip3 install TwitterAPI && sudo pip3 install apscheduler
sudo pip3 install setuptools --upgrade
sudo pip3 install --upgrade requests sudo mv config.json.example config.json now make the values correspond to your Twitter API credentials sudo main.py
hope it works now!
Bit of a newb when it comes to Python and can't seem to fix the following error.
Any ideas why I'm unable to run
python main.py
?