Skip to content

Commit

Permalink
Fix 'coroutine' object has no attribute 'stats' error in analysis res…
Browse files Browse the repository at this point in the history
…ults for upload_files.py (#157)
  • Loading branch information
shen-qin authored Aug 21, 2023
1 parent d44c39a commit c0a4029
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ vt_py.egg-info
/.idea

.vscode/

.DS_Store
1 change: 1 addition & 0 deletions examples/upload_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ async def process_analysis_results(apikey, analysis, file_path):
async with vt.Client(apikey) as client:
completed_analysis = await client.wait_for_analysis_completion(analysis)
print(f'{file_path}: {completed_analysis.stats}')
print(f'analysis id: {completed_analysis.id}')


async def main():
Expand Down
2 changes: 1 addition & 1 deletion vt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,4 +758,4 @@ async def _wait_for_analysis_completion(self, analysis):
return analysis

async def wait_for_analysis_completion(self, analysis):
return self._wait_for_analysis_completion(analysis)
return await self._wait_for_analysis_completion(analysis)

0 comments on commit c0a4029

Please sign in to comment.