TypeError: 'NoneType' object is not callable while using async for
Closed this issue · 0 comments
Bobronium commented
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:
Proposed solution:
Change line above to:
session_factory = self.__class__ if session_factory is None else session_factory