langflow icon indicating copy to clipboard operation
langflow copied to clipboard

File component doesn't load file

Open dsolito opened this issue 10 months ago • 10 comments

Bug Description

When I try to load a file, the file is not loaded. The field stay empty.

log:

Error building Component File:

Please upload a file for processing.

Traceback (most recent call last): File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/site-packages/langflow/graph/vertex/base.py", line 709, in _build_results result = await initialize.loading.get_instance_results( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/site-packages/langflow/interface/initialize/loading.py", line 68, in get_instance_results return await build_component(params=custom_params, custom_component=custom_component) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/site-packages/langflow/interface/initialize/loading.py", line 145, in build_component build_results, artifacts = await custom_component.build_results() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 837, in build_results return await self._build_with_tracing() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 819, in _build_with_tracing _results, _artifacts = await self._build_results() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 885, in _build_results result = await asyncio.to_thread(method) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/asyncio/threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/dsolito/Library/r-miniconda/envs/langflow/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 74, in load_file ValueError: Please upload a file for processing.

Reproduction

  1. place a new file input component
  2. select a file
  3. run the component

Expected behavior

file should be parsed and found

Who can help?

No response

Operating System

Mac OS

Langflow Version

1.1.1

Python Version

3.12

Screenshot

No response

Flow File

No response

dsolito avatar Nov 30 '24 21:11 dsolito