Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Bug} Error in export script while exporting collection #49

Open
hmoghani opened this issue Mar 13, 2022 · 0 comments
Open

{Bug} Error in export script while exporting collection #49

hmoghani opened this issue Mar 13, 2022 · 0 comments

Comments

@hmoghani
Copy link

hmoghani commented Mar 13, 2022

I encountered an error while I was trying to export my tv-shows collection into a csv file:

(trakt) $ python3 export_trakt.py -o collection.csv -f trakt -l collection -V
Options: Namespace(config='config.ini', output='collection.csv', format='trakt', type='movies', list='collection', userlist=None, listid=None, clean=False, dup=False, sortorder='desc', verbose=True)
Config file: config.ini
Config: <configparser.ConfigParser object at 0x103062cd0>
Trakt, skipped access token refresh, token is less than 30 days, only 0:15:37.121335
Trakt: {'client_id': 'xxxx', 'client_secret': 'xxxx', 'access_token': 'xxxx', 'refresh_token': 'xxxx', 'baseurl': 'https://api-v2launch.trakt.tv'}
Authorization header: Bearer xxxx
trakt-api-key header: xxxx
https://api-v2launch.trakt.tv/sync/collection/movies?page=1&limit=1000
Traceback (most recent call last):
  File "/Users/xxx/git/trakt/export_trakt.py", line 605, in <module>
    main()
  File "/Users/xxx/git/trakt/export_trakt.py", line 460, in main
    export_data = api_get_list(options, 1)
  File "/Users/xxx/git/trakt/export_trakt.py", line 233, in api_get_list
    if int(r.headers['X-Pagination-Page-Count']) == 0:
  File "/Users/xxx/git/trakt/trakt/lib/python3.9/site-packages/requests/structures.py", line 54, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'x-pagination-page-count'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant