Skip to content

[BUG]Error: "cannot pickle '_io.BufferedReader' object" when creating BOT  #762

Open
@isanori234-ghb

Description

@isanori234-ghb

🚨 Please Note 🚨

When trying to create a BOT by uploading a file of around 10 bytes, I encountered the following error and was unable to create the BOT properly.

An error occurred during synchronization.
Error sending result: '<multiprocessing.pool.ExceptionWithTraceback object at 0x7fbaa4eb2a10>'. Reason: 'TypeError("cannot pickle '_io.BufferedReader' object")'

🔄 To Reproduce

Steps to reproduce the behavior:

  1. Click "Bot Console"
  2. Click "Create New Bot"
  3. Create a bot with any name
  4. Upload a file in the file section
  5. Click "Create New"

It enters a processing state, and then an error occurs.

The contents of the text file are as follows:

`
Test 1

Test 2

Test 3
`

📷 Screenshots

Synchronization error
An error occurred during synchronization.
Error sending result: '<multiprocessing.pool.ExceptionWithTraceback object at 0x7fbaa4eb2a10>'. Reason: 'TypeError("cannot pickle '_io.BufferedReader' object")'

🔎 Logs for Chat Issues

`
INFO:app.repositories.custom_bot:Finding bot with id: xxxxx

INFO:app.repositories.custom_bot:Found bot: id='xxxxx' title='TestTextUpload' description='' instruction='' .... bedrock_guardrails=None
INFO:main:source_urls to crawl: []
INFO:main:sitemap_urls to crawl: []
INFO:main:filenames: ['test.txt']
INFO:main:chunk_size: 1500
INFO:main:chunk_overlap: 300
INFO:main:enable_partition_pdf: False
INFO:embedding.loaders.s3:Start partitioning using auto mode: /tmp/xxxxxx/xxxx/xxxx/documents/test.txt
ERROR:main:[ERROR] Failed to embed.
ERROR:main:Error sending result: '<multiprocessing.pool.ExceptionWithTraceback object at 0x7fbaa4eb2a10>'. Reason: 'TypeError("cannot pickle '_io.BufferedReader' object")'
`

Please let me know the cause and how to resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-infoNeed more information such as reproduction step

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions