UTF 8
How to solve UTF 8 issue while processing few pdfs for Rag.. any solution ?
Could you share more information about your UTF-8 issue, along with details on what tools you used to process it?
when I upload PDF below error I can see in --opik
exception_type: RuntimeError
message: called add_log but no component context found
traceback: |
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/langflow/base/data/utils.py", line 144, in parse_text_file_to_data
text = read_text_file(file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langflow/base/data/utils.py", line 120, in read_text_file
return file_path_.read_text(encoding=encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 1028, in read_text
return f.read()
^^^^^^^^
File "
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1064, in build_results
return await self._build_with_tracing()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1046, in _build_with_tracing
results, artifacts = await self._build_results()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1091, in _build_results
result = await self._get_output_result(output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langflow/custom/custom_component/component.py", line 1166, in _get_output_result
result = await method() if inspect.iscoroutinefunction(method) else await asyncio.to_thread(method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langflow/base/data/base_file.py", line 382, in load_files
data_list = self.load_files_core()
^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langflow/base/data/base_file.py", line 239, in load_files_core
data_list = self.load_files_base()
^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langflow/base/data/base_file.py", line 216, in load_files_base
processed_files = self.process_files(final_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "
Hi @VGLOQO
I tried to reproduce your bug in the latest version, but it doesn't work. Could you please check if it occurs in the last langflow version?