Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
loader()
  • Loading branch information
su77ungr committed May 12, 2023
1 parent b2fa87f commit 93f8949
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def main(sources_directory, cleandb):
loader = PDFMinerLoader(os.path.join(root, file))
elif file.endswith(".csv"):
loader = CSVLoader(os.path.join(root, file))


documents = loader.load()

This comment has been minimized.

Copy link
@imSrbh

imSrbh May 12, 2023

@su77ungr
line 30, in main
documents = loader.load()
^^^^^^
UnboundLocalError: cannot access local variable 'loader' where it is not associated with a value


text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=50)
texts = text_splitter.split_documents(documents)
Expand Down

1 comment on commit 93f8949

@imSrbh
Copy link

@imSrbh imSrbh commented on 93f8949 May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 30, in main
documents = loader.load()
^^^^^^
UnboundLocalError: cannot access local variable 'loader' where it is not associated with a value

Please sign in to comment.