Closed jannichorst closed 1 month ago
Hey @jannichorst,
It seems that you're using Fundus in an async context. Most likely google colab? If not please let me know and I further investigate the issue. Fundus 0.2.2
utilizes asyncio
and won't work in an already running event loop using crawl
due to the limitations of asyncio
. We recently #357 got rid of Fundus' async logic, but a new release is yet to come. You can either checkout the latest master branch (as you already mentioned :) ) or utilize Fundus' async interface (see also #344):
from fundus import Crawler, PublisherCollection
crawler = Crawler(*PublisherCollection.us.WashingtonTimes)
async for article in crawler.crawl_async(max_articles=10):
print(article)
Thanks for reporting this anyway :)
I released version 0.3.0
to PyPi. You should now be able to install and run Fundus within an asynchronous context from PyPi again.
Thanks @MaxDall! I was working out of a notebook in VS Code. I reported it because it took me too much time to figure out why the exact same code was running in one project but not in the other to figure out that it was the installed version on pypi. Can assume others might ran into the same problem. Thanks for reacting so quickly. I will check out the new version shortly.
PS: I tried crawl_async
under 0.2.2 and it ran into issues as well.
Describe the bug
When installing version 0.2.2 via
pip install fundus
crawling anything runs into anRuntimeError: There is already an event loop running
. This can be resolved by installing it manually from git like:pip install -e git+https://github.com/flairNLP/fundus.git@ff54845f204d74c3572311ca030ddd0a93df09b6#egg=fundus
How to reproduce
Expected behavior.
Fundus-Article:
Logs and Stack traces
Screenshots
No response
Additional Context
No response
Environment