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

TypeError: 'NoneType' object is not callable while using async for #10

Closed
Bobronium opened this issue Aug 22, 2019 · 0 comments · Fixed by #12
Closed

TypeError: 'NoneType' object is not callable while using async for #10

Bobronium opened this issue Aug 22, 2019 · 0 comments · Fixed by #12

Comments

@Bobronium
Copy link
Contributor

Bobronium commented Aug 22, 2019

Executing first example from readme starts output files, but right after first iteration gives me this:

my_file_1.txt
my_other_file.jpeg
...
Traceback (most recent call last):
    ...
  File "/Users/rocky/dev/py/gdrive.py", line 12, in list_files
    async for page in full_res:
  File ".../aiogoogle/models.py", line 290, in _next_page_generator
    async with session_factory() as sess:
TypeError: 'NoneType' object is not callable

Additional info:
Due to some SSL issues, I used AiohttpSession with custom connector through session_factory
Just was able to run it without specifying any custom sessions, get same result

Possible reason:

session_factory = self.__class__ if session_factory is None else None

Proposed solution:

Change line above to:

        session_factory = self.__class__ if session_factory is None else session_factory
Bobronium added a commit to Bobronium/aiogoogle that referenced this issue Aug 22, 2019
omarryhan added a commit that referenced this issue Aug 22, 2019
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 a pull request may close this issue.

1 participant