Find answers from the community

Updated 9 months ago

Hey guys, I keep getting this error from

Hey guys, I keep getting this error from llama_index in python: 3.11/lib/python3.11/dataclasses.py", line 1027, in _process_class
_init_fn(all_init_fields,
File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 545, in _init_fn
raise TypeError(f'non-default argument {f.name!r} '
TypeError: non-default argument 'source_nodes' follows default argument

I'm only trying to import simpledirectoryreader and have isolated it to only require this statement: from llama_index.core import SimpleDirectoryReader

I've tried different python versions, llama_index version and pydantic versions. It also only recently started happening after reinstalling the environment after a week.

Any clues on what could cuase this? I've been blocked all day
L
m
3 comments
Do you have the full traceback?
Hey Logan, thank for reaching out. I fixed it somehow, had something to do with the python version. Updated some random packages and reverted a python version and it works now
Still not 100% sure what went wrong though
Add a reply
Sign up and join the conversation on Discord