ceari / whyattend

World of Tanks Attendance Tracker
BSD 2-Clause "Simplified" License
9 stars 8 forks source link

Problem while trying to sync the clan data #25

Closed enbewu closed 10 years ago

enbewu commented 10 years ago
INFO:whyattend.webapp:Clan member synchronization triggered for 500021712
ERROR:whyattend.webapp:Exception on /sync-players/ [GET]
Traceback (most recent call last):
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/cwtracker/cw.psqd.co/whyattend/webapp.py", line 232, in sync_players
    member_data = member_info['data'][player_id]
TypeError: 'NoneType' object has no attribute '__getitem__'
ERROR:tornado.access:500 GET /sync-players/?API_KEY=xxx(127.0.0.1) 2525.59ms
ceari commented 10 years ago

So this seems to only happen occasionally? I just tried sync'ing a few times and sometimes it worked, sometimes it didn't

enbewu commented 10 years ago

Not really - this bug is persistent. I can sync PSQD data but PSQDX/PSQDA fails. Yesterday a friend installed the tracker for his clan - STRNK and also has the same problem.

ceari commented 10 years ago

When I run the synchronisation the Wargaming API very rarely returns {u'status': u'error', u'error': {u'field': None, u'message': u'UNKNOWN_SERVER_ERROR', u'code': 500, u'value': None}} as response to the clan member info query which causes the error. Not really sure what to do about it since it seems random to me.

Gucioo commented 10 years ago

I have run CW Tracker with help of 'enbewu' (thx) and I had the same error like enbewu, when trying to run the synchronisation, but there was many times error and after 6-7time it was ok. And STRNK now have runing and working tracker. So maybe its random..

enbewu commented 10 years ago

Great!

So OK. Maybe there is something else on my side.

ceari commented 10 years ago

I wrote on the WG developer partner program forum, maybe they can figure something out: http://forum.worldoftanks.eu/index.php?/topic/335076-general-discussion-of-wargaming-public-api/page__st__140__pid__8013448#entry8013448

enbewu commented 10 years ago

Yep, and probably this has solved it - I can sync the data by hand and also I see that scheduled syncing in cron also works.

CAVACO-PT commented 9 years ago

im having this error :

'NoneType' object has no attribute 'getitem' ERROR:whyattend.webapp:'NoneType' object has no attribute 'getitem'

^CTraceback (most recent call last): File "runtornado.py", line 8, in IOLoop.instance().start() File "/var/www/whyattend/myenv/local/lib/python2.7/site-packages/tornado/ioloop.py", line 662, in start event_pairs = self._impl.poll(poll_timeout)

Anyone knows what causes it ??