Replies: 2 comments
-
the step that I follow so far is :
thankyou for help in advance |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @96harsh56! I was not able to replicate this issue. Can it be the case that your docker container doesn't have access to the internet? It seems to fail when trying to download an NLTK resource. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/haystack/pipelines/base.py", line 527, in run
node_output, stream_id = self._run_node(node_id, node_input)
File "/opt/venv/lib/python3.10/site-packages/haystack/pipelines/base.py", line 454, in _run_node
return self.graph.nodes[node_id]["component"]._dispatch_run(**node_input)
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/base.py", line 201, in _dispatch_run
return self._dispatch_run_general(self.run, **kwargs)
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/base.py", line 245, in _dispatch_run_general
output, stream = run_method(**run_inputs, **run_params)
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/base.py", line 71, in run
processed_documents = self.process(
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 165, in process
ret = self._process_batch(documents=list(documents), id_hash_keys=id_hash_keys, **kwargs)
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 223, in _process_batch
nested_docs = [
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 224, in
self._process_single(d, id_hash_keys=id_hash_keys, **kwargs)
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 210, in _process_single
split_documents = self.split(
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 319, in split
text_splits, splits_pages, splits_start_idxs = self._split_by_word_respecting_sent_boundary(
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 421, in _split_by_word_respecting_sent_boundary
sentences = self._split_sentences(text)
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 703, in _split_sentences
sentence_tokenizer = self._load_sentence_tokenizer(language_name)
File "/opt/venv/lib/python3.10/site-packages/haystack/nodes/preprocessor/preprocessor.py", line 760, in _load_sentence_tokenizer
sentence_tokenizer = nltk.data.load(f"tokenizers/punkt/{language_name}.pickle")
File "/opt/venv/lib/python3.10/site-packages/nltk/data.py", line 750, in load
opened_resource = _open(resource_url)
File "/opt/venv/lib/python3.10/site-packages/nltk/data.py", line 876, in open
return find(path, path + [""]).open()
File "/opt/venv/lib/python3.10/site-packages/nltk/data.py", line 583, in find
raise LookupError(resource_not_found)
LookupError:
Resource �[93mpunkt�[0m not found.
Please use the NLTK Downloader to obtain the resource:
�[31m>>> import nltk
Attempted to load �[93mtokenizers/punkt/PY3/english.pickle�[0m
Searched in:
- '/root/nltk_data'
- '/opt/venv/nltk_data'
- '/opt/venv/share/nltk_data'
- '/opt/venv/lib/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
- ''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response
await self.app(scope, receive, send)
File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/opt/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/opt/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/opt/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 706, in call
await route.handle(scope, receive, send)
File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/opt/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/opt/venv/lib/python3.10/site-packages/fastapi/routing.py", line 235, in app
raw_response = await run_endpoint_function(
File "/opt/venv/lib/python3.10/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/opt/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/opt/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/opt/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/opt/venv/lib/python3.10/site-packages/rest_api/controller/file_upload.py", line 88, in upload_file
indexing_pipeline.run(file_paths=file_paths, meta=file_metas, params=params)
File "/opt/venv/lib/python3.10/site-packages/haystack/pipelines/base.py", line 532, in run
raise Exception(
Exception: Exception while running node 'Preprocessor':
Resource �[93mpunkt�[0m not found.
Please use the NLTK Downloader to obtain the resource:
�[31m>>> import nltk
Attempted to load �[93mtokenizers/punkt/PY3/english.pickle�[0m
Searched in:
- '/root/nltk_data'
- '/opt/venv/nltk_data'
- '/opt/venv/share/nltk_data'
- '/opt/venv/lib/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
- ''
Enable debug logging to see the data that was passed when the pipeline failed.
Beta Was this translation helpful? Give feedback.
All reactions