Find answers from the community

Updated 5 months ago

import json

At a glance
import json

from llama_index import SimpleDirectoryReader
from llama_index.node_parser import SimpleNodeParser
from llama_index.schema import MetadataMode

when i run this code, i get the following error:
Plain Text
ImportError                               Traceback (most recent call last)
<ipython-input-27-d1c3d38fe58f> in <cell line: 3>()
      1 import json
      2 
----> 3 from llama_index import VectorStoreIndex, SimpleDirectoryReader
      4 
      5 from llama_index import SimpleDirectoryReader

12 frames
/usr/local/lib/python3.10/dist-packages/openai/_utils/_streams.py in <module>
      1 from typing import Any
----> 2 from typing_extensions import Iterator, AsyncIterator
      3 
      4 
      5 def consume_sync_iterator(iterator: Iterator[Any]) -> None:

ImportError: cannot import name 'Iterator' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)
L
a
4 comments
what version of typing_extensions do you have? pip show typing-extensions
llama-index requires 4.9.0
mine is 4.11.x
that would be the issue then πŸ‘€
Add a reply
Sign up and join the conversation on Discord