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

Ignore CancelledError results. #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

montaguethomas
Copy link

@montaguethomas montaguethomas commented Jun 21, 2024

Initialization fails with:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.12/site-packages/amazon_photos/_api.py", line 78, in __init__
    self.folders = self.get_folders()
                   ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/amazon_photos/_api.py", line 973, in get_folders
    folders = asyncio.run(main([{'id': self.root['id']}]))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.12/site-packages/amazon_photos/_api.py", line 971, in main
    return [y for x in results if x for y in x]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'CancelledError' object is not iterable

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

Successfully merging this pull request may close these issues.

1 participant