Skip to content

RuntimeWarning: Enable tracemalloc to get the object allocation traceback #909

Closed Answered by wuyang910
wuyang910 asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you @maykcaldas
I run the code in vscode with the format of ".py". I try to add nast_asyncio to the beginning of my ".py". But the Runtime error still exists. I follow your advice, I try to run the code in a jupyter notebook with adding the code

import nest_asyncio
nest_asyncio.apply() 

to the beginning of my notebook. It works well. But I still don‘t understand what's the problem of runnming Doc synchronously in the format of ".py"
So I read the document of usage of paperqa in Pypi again carefully. This is the link https://pypi.org/project/paper-qa/ . I try to use Doc asynchronously in “.py”,it then works well.
My code as follows:

import asyncio
from paperqa import Docs

async def…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@wuyang910
Comment options

Answer selected by maykcaldas
@wuyang910
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants