Closed bruvv closed 6 years ago
When running it with python 2.7 I get the same:
2015-12-12 13:06:20,478 - INFO - [2015-12-12 13:06:20.478143] - added last task at 2015-12-13 11:03:11.263036
Traceback (most recent call last):
File "/home/ubuntu/workspace/main.py", line 435, in <module>
CheckRateLimit()
File "/home/ubuntu/workspace/main.py", line 182, in CheckRateLimit
for res_family in r['resources']:
KeyError: 'resources'
got the same error
kurozael hasnt worked on this in a while. You can try mine in the meantime if you would like: https://github.com/ModusVivendi/twitter-contest
thanks, well i already have your's one and a another one here to try after this. And as your project is forked from this one, main.py file from here has TabError: inconsistent use of tabs and spaces in indentation in python3 as Python3 disallows mixing the use of tabs and spaces for indentation but not in python2. Does your source code also has this inconsistency in indentation as your requirement is to run it in Python3.
If run in Python 3.+ you should not have that issue.
got the same error in your code also
its working now. i have a question for how much time should i run it continuously.
And i think you should also add "#Giveaway" and "entered to win" in search queries also. And could i do this manually in main.py
@Asundawn how did you fix the CheckRatelimit & resources error?
nvm i fixed it
This error happens when r['resources']
returns null. You should add a basic test if 'resources' in r:
and indent the block. It's how i fixed it.
The part of the code :
r = api.request('application/rate_limit_status').json() if 'resources' in r: for res_family in r['resources']: for res in r['resources'][res_family]:
sorry do you have the code with the correct indents?
I added a pull request with all the correct indents.
Thanks
I'm now seeing these errors. I have checked my tokens and they are fine
`Loading ignore list
=== SCANNING FOR NEW CONTESTS ===
Getting new results for: RT to win
752063002623537152 in ignore list
752296560168284160 in ignore list
Could not connect to TwitterAPI - are your credentials correct?
Traceback (most recent call last):
File "main.py", line 244, in
Traceback (most recent call last): File "/usr/local/lib/python2.7/threading.py", line 810, in __bootstrap_inner File "/usr/local/lib/python2.7/threading.py", line 810, in __bootstrap_inner File "/usr/local/lib/python2.7/threading.py", line 1082, in run File "main.py", line 57, in CheckRateLimit File "/usr/local/lib/python2.7/threading.py", line 1082, in run <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'Timer'
File "main.py", line 157, in ScanForContests <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'Timer'`
I see two main errors :
-A problem with the twitter API. I got it too and fixed it by hardcoding the different value from config.json file into the script
-A problem at line 236 : replace print("Exception:"+e)
with :
print("Exception:")
print(e)
This should solve the concatenation issue.
I believe that the error
'NoneType' object has no attribute 'Timer'
is a consequence of the previous errors
Thanks
that fixed everything but still getting the TwitterAPI errors
=== SCANNING FOR NEW CONTESTS ===
Getting new results for: RT to win
752063002623537152 in ignore list
752296560168284160 in ignore list
Could not connect to TwitterAPI - are your credentials correct?
Exception:
local variable 'original_screen_name' referenced before assignment
Getting new results for: Retweet and win
Could not connect to TwitterAPI - are your credentials correct?
Exception:
local variable 'original_screen_name' referenced before assignment
=== CHECKING RETWEET QUEUE ===
Queue length: 0
@pbartett I get the same error. Were you able to solve it?
I am running Pyhton 3.4 and getting the following error:
It adds task and then at the last task it fails.