Closed OmerAbramovich closed 4 years ago
I'm trying to remove a file from a local directory asynchronously; however, I get the following error: object NoneType can't be used in 'await' expression (<class 'TypeError'>) I'm using ver aiofiles 0.5.0 and Python 3.6.5
my code is as straightforward as such:
async def delete_local_file(file_to_del): await aiof.os.remove(file_to_del) print("deleted: "+file_to_del) await delete_local_file(localfile)
I'm trying to remove a file from a local directory asynchronously; however, I get the following error: object NoneType can't be used in 'await' expression (<class 'TypeError'>) I'm using ver aiofiles 0.5.0 and Python 3.6.5
my code is as straightforward as such: