flairNLP / fundus

A very simple news crawler with a funny name
MIT License
45 stars 54 forks source link

Not able to use Fundus due to not being able to load a library #449

Open aaslan20 opened 1 week ago

aaslan20 commented 1 week ago

Problem: I can't use Fundus at all Description: When trying to import something from Fundus I get the error that a library cannot be loaded My attempt to solve it: I installed zlib 1.2.1, configured and compiled it in terminal. Lastly I added the path to my bash_profile so the libz.1.2.13.dylib can be loaded. Additionally I checked the rights for libz.1.2.13.dylib Stack Trace: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastwarc/stream_io.cpython-39-darwin.so, 2): Library not loaded: @loader_path/.dylibs/libz.1.2.13.dylib Referenced from: [/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastwarc/stream_io.cpython-39-darwin.so](https://file+.vscode-resource.vscode-cdn.net/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages Environment: OS: Mojave 10.14.6 Python: 3.9 Fundus: 0.3.0 Zlib: 1.2.13

MaxDall commented 1 week ago

@aaslan20 Sorry to hear that you're not able to run Fundus!

Could you post the log/stack trace you are getting? Maybe check out this issue #284 for what I mean. The repository also supports issue templates for opening new issues to normalize things a bit.

aaslan20 commented 1 week ago

Traceback (most recent call last): File "/Users/aliaslan/exercise-1-data-crawling-and-bow-classifier-aaslan20/task_1/fundus_crawler.py", line 2, in from fundus import PublisherCollection, Crawler File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fundus/init.py", line 4, in from fundus.scraping.crawler import CCNewsCrawler, Crawler, CrawlerBase File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fundus/scraping/crawler.py", line 40, in from fundus.scraping.article import Article File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fundus/scraping/article.py", line 13, in from fundus.scraping.html import HTML File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fundus/scraping/html.py", line 10, in from fastwarc import ArchiveIterator, WarcRecord, WarcRecordType File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastwarc/init.py", line 15, in from .stream_io import FileStream, GZipStream, LZ4Stream ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastwarc/stream_io.cpython-39-darwin.so, 2): Library not loaded: @loader_path/.dylibs/libz.1.2.13.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastwarc/stream_io.cpython-39-darwin.so Reason: no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastwarc/.dylibs/libz.1.2.13.dylib: cannot load 'libz.1.2.13.dylib' (load command 0x80000034 is unknown) /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastwarc/.dylibs/libz.1.2.13.dylib: cannot load 'libz.1.2.13.dylib' (load command 0x80000034 is unknown)

MaxDall commented 1 week ago

Thanks @aaslan20 :) Could you check if pip install FastWARC==0.14.5 solves your issue for now?

aaslan20 commented 1 week ago

I already have FastWARC==0.14.5 and I optionally tried to update it. The result is the same error, but instead of libz.1.2.13.dylib it wanted a newer version. For now I used Colab to solve my task with Fundus

MaxDall commented 1 week ago

@aaslan20 Maybe this comment can solve your problem? Pls let me know if so :)