Skip to content

File loader error and solution #1

@infocz-shinjaehyun

Description

@infocz-shinjaehyun

Error loading file llm-vectors-unstructured\data\asciidoc\courses\llm-fundamentals\modules\1-introduction\lessons\1-neo4j-and-genai\lesson.adoc
text = f.read()
^^^^^^^^
UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 2604: illegal multibyte sequence

This error occurred while learning the neo4j graph academy course
This was an issue related to document loader encoding

i solved it by adding the code "loader.loader_cls = lambda path: TextLoader(path, encoding='utf-8')" after "loader = DirectoryLoader(COURSES_PATH, glob="**/lesson.adoc", loader_cls=TextLoader)"

i hope this helps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions