dailymotion-sdk-python icon indicating copy to clipboard operation
dailymotion-sdk-python copied to clipboard

failed to raise DailymotionTokenExpired

Open AndCycle opened this issue 8 years ago • 0 comments

just hit this,

I write a small upload script to batch upload my video, as those video always exceed the limit, so I put it into a simple loop to wait for 24hrs if it hits the limitation,

original thought I should refresh the token manually at first place, but def call do try to catch this and refresh it.

Traceback (most recent call last):
  File "/mnt/mess0/public/tmp/dailymotion_upload/go.py", line 79, in <module>
    main()
  File "/mnt/mess0/public/tmp/dailymotion_upload/go.py", line 46, in main
    r = dm.get('/user/me/videos', params={'fields': 'updated_time,duration', 'created_after': int(time.time()-24*60*60), 'limit': 100})
  File "/mnt/mess0/public/tmp/dailymotion_upload/runtime/lib/python2.7/site-packages/dailymotion.py", line 321, in get
    return self.call(endpoint, params=params)
  File "/mnt/mess0/public/tmp/dailymotion_upload/runtime/lib/python2.7/site-packages/dailymotion.py", line 334, in call
    return self.request(endpoint, method, params, files)
  File "/mnt/mess0/public/tmp/dailymotion_upload/runtime/lib/python2.7/site-packages/dailymotion.py", line 425, in request
    raise DailymotionAuthError(msg, error_type='auth_error')
dailymotion.DailymotionAuthError: auth_error: The access token has expired.

AndCycle avatar Feb 09 '17 11:02 AndCycle