fuzeman / trakt-tools

Command-line tools for Trakt.tv.
37 stars 5 forks source link

Getting "Entire history wasn't retrieved" #2

Open MarkVillacampa opened 5 years ago

MarkVillacampa commented 5 years ago

Some pages are not returning the 1000 items they should. Is there any way I can debug which items are not being returned and why?


Navigate to https://trakt.tv/pin/XXXX
Pin: XXXXX

Requesting profile...
Logged in as u'XXXX'

Would you like to continue? [yes]: yes

Collection
 - Received 0 movie(s)
 - Writing to "collection/movies.json"...
 - Received 0 show(s)
 - Writing to "collection/shows.json"...

History
 - Received 998 item(s) (page 1 of 5)
 - Received 999 item(s) (page 2 of 5)
 - Received 1000 item(s) (page 3 of 5)
 - Received 999 item(s) (page 4 of 5)
 - Received 256 item(s) (page 5 of 5)
Traceback (most recent call last):
  File "/Users/mark/.homebrew/bin/trakt_tools", line 11, in <module>
    sys.exit(main())
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/trakt_tools/runner/main.py", line 58, in main
    cli(prog_name=get_prog(), obj={}, max_content_width=100)
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/trakt_tools/runner/commands/profile/backup/create.py", line 55, in profile_backup_create
    token=token
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/trakt_tools/tasks/profile/backup/create/main.py", line 40, in run
    return self.process()
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/trakt_tools/tasks/profile/backup/create/main.py", line 64, in process
    return self.create_backup(profile)
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/trakt_tools/tasks/profile/backup/create/main.py", line 73, in create_backup
    if not h.run(backup, profile):
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/trakt_tools/tasks/profile/backup/create/handlers/history.py", line 14, in run
    for i, count, page in profile.get_pages('/sync/history'):
  File "/Users/mark/.homebrew/lib/python2.7/site-packages/trakt_tools/models/profile.py", line 197, in get_pages
    received_count
Exception: Entire history wasn't retrieved (expected 4256 item(s), received 4252 item(s)```
pedrojvaz commented 3 years ago

I'm getting the same error, using Python 3.9.0

Collection
 - Received XX movie(s)
 - Writing to "collection/movies.json"...
 - Received XX show(s)
 - Writing to "collection/shows.json"...

History
 - Received 1000 item(s) (page 1 of 5)
 - Received 1000 item(s) (page 2 of 5)
 - Received 1000 item(s) (page 3 of 5)
 - Received 999 item(s) (page 4 of 5)
 - Received 144 item(s) (page 5 of 5)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/trakt_tools", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trakt_tools/runner/main.py", line 59, in main
    cli(prog_name=get_prog(), obj={}, max_content_width=100)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trakt_tools/runner/commands/profile/backup/create.py", line 48, in profile_backup_create
    success = CreateBackupTask(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trakt_tools/tasks/profile/backup/create/main.py", line 40, in run
    return self.process()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trakt_tools/tasks/profile/backup/create/main.py", line 64, in process
    return self.create_backup(profile)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trakt_tools/tasks/profile/backup/create/main.py", line 73, in create_backup
    if not h.run(backup, profile):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trakt_tools/tasks/profile/backup/create/handlers/history.py", line 14, in run
    for i, count, page in profile.get_pages('/sync/history'):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/trakt_tools/models/profile.py", line 195, in get_pages
    raise Exception("Entire history wasn't retrieved (expected %d item(s), received %d item(s)" % (
Exception: Entire history wasn't retrieved (expected 4144 item(s), received 4143 item(s)
enrique131 commented 7 months ago

Same error here. Did anyone found a solution?