run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
36.39k stars 5.2k forks source link

[Bug]: cannot import name 'BeautifulSoupWebReader' from 'llama_index.readers' (unknown location) #13253

Closed davidchapuis closed 5 months ago

davidchapuis commented 5 months ago

Bug Description

Using Google Colab, after installing successfully Llama Index either with this command !pip install llama-index or this one !pip install git+https://github.com/run-llama/llama_index

I get errors when importing such as this one

`ImportError Traceback (most recent call last)

in <cell line: 1>() ----> 1 from llama_index.readers import BeautifulSoupWebReader 2 3 url = "https://www.theverge.com/2023/9/29/23895675/ai-bot-social-network-openai-meta-chatbots" 4 5 documents = BeautifulSoupWebReader().load_data([url])

ImportError: cannot import name 'BeautifulSoupWebReader' from 'llama_index.readers' (unknown location)`

You can check the notebook here: https://colab.research.google.com/drive/1ZAdrabTJmZ_etDp10rjij_zME2Q3umAQ?usp=sharing#scrollTo=quYBhKouOIxM

Version

0.10.34

Steps to Reproduce

Run the cells of the notebook

Relevant Logs/Tracbacks

ImportError                               Traceback (most recent call last)

<ipython-input-10-2d34c01a0145> in <cell line: 1>()
----> 1 from llama_index.readers import BeautifulSoupWebReader

ImportError: cannot import name 'BeautifulSoupWebReader' from 'llama_index.readers' (unknown location)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
dosubot[bot] commented 5 months ago

Hey @davidchapuis! 👋 I'm Dosu, your friendly bot here to help you tackle bugs, answer questions, and dive into the world of contributing while we're waiting for a human maintainer to hop in. Don't worry, I've got your issue in my sights and I'm on it! Will get back to you with an answer shortly. 🤖🔍

logan-markewich commented 5 months ago

@davidchapuis llama-index is a collection of packages. pip install llama-index is like a starter bundle of several packages (llama-index-core, llama-index-llms-openai, llama-index-readers-file, etc.)

If you want to use beautiful soup, you need to install the web readers pip install llama-index-readers-web

Every integration is a package. You can see everything on https://llamahub.ai