ChatWithBinary icon indicating copy to clipboard operation
ChatWithBinary copied to clipboard

Resource punkt not found.

Open qiurigao opened this issue 1 year ago • 0 comments

python3 Ret2GPT.py prog_firehose_sm8350_ddr.elf Welcome to Ret2GPT 欢迎来到 Ret2GPT
HINT: USE /help TO CHECK FOR COMMANDS USE / TO USE COMMANDS File prog_firehose_sm8350_ddr.elf.c already exists, thank god. skipping "retdec-decompile", lets continue Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/unstructured/nlp/tokenize.py",line 21, in _download_nltk_package_if_not_present nltk.find(f"{package_category}/{package_name}") File "/usr/local/lib/python3.8/dist-packages/nltk/data.py", line 583, in find raise LookupError(resource_not_found) LookupError: ********************************************************************** Resource punkt not found. Please use the NLTK Downloader to obtain the resource: >>> import nltk >>> nltk.download('punkt') For more information see: https://www.nltk.org/data.html
Attempted to load tokenizers/punkt Searched in: - '/root/nltk_data' - '/usr/nltk_data' - '/usr/share/nltk_data' - '/usr/lib/nltk_data' - '/usr/share/nltk_data' - '/usr/local/share/nltk_data' - '/usr/lib/nltk_data' - '/usr/local/lib/nltk_data' ********************************************************************** During handling of the above exception, another exception occurred: Traceback (most recent call last): File "Ret2GPT.py", line 17, in command_line.main() File "/root/Ret2GPT/built_in_command/command_line.py", line 134, in main loop() File "/root/Ret2GPT/built_in_command/command_line.py", line 112, in loop created_qa = pwnchain.create_qa(loader) File "/root/Ret2GPT/langchain_preprocess/prompt_builder.py", line 46, in create_qa db = Chroma.from_documents(split_files(loader), embeddings) File "/root/Ret2GPT/langchain_preprocess/prompt_builder.py", line 36, in split_files document = loader.load() File "/usr/local/lib/python3.8/dist-packages/langchain/document_loaders/uns tructured.py", line 61, in load elements = self._get_elements() File "/usr/local/lib/python3.8/dist-packages/langchain/document_loaders/unstructured.py", line 95, in _get_elements return partition(filename=self.file_path, **self.unstructured_kwargs) File "/usr/local/lib/python3.8/dist-packages/unstructured/partition/auto.py", line 436, in partition elements = partition_text( File "/usr/local/lib/python3.8/dist-packages/unstructured/partition/text.py", line 93, in partition_text return _partition_text( File "/usr/local/lib/python3.8/dist-packages/unstructured/documents/elements.py", line 518, in wrapper elements = func(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/unstructured/file_utils/filetype.py", line 591, in wrapper elements = func(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/unstructured/file_utils/filetype.py", line 546, in wrapper elements = func(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/unstructured/chunking/init.py", line 52, in wrapper elements = func(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/unstructured/partition/text.py", line 169, in _partition_text file_content = _split_by_paragraph( File "/usr/local/lib/python3.8/dist-packages/unstructured/partition/text.py", line 301, in _split_by_paragraph _split_content_to_fit_max( File "/usr/local/lib/python3.8/dist-packages/unstructured/partition/text.py", line 333, in _split_content_to_fit_max sentences = sent_tokenize(content) File "/usr/local/lib/python3.8/dist-packages/unstructured/nlp/tokenize.py",line 29, in sent_tokenize _download_nltk_package_if_not_present(package_category="tokenizers", package_name="punkt") File "/usr/local/lib/python3.8/dist-packages/unstructured/nlp/tokenize.py",line 23, in _download_nltk_package_if_not_present nltk.download(package_name) File "/usr/local/lib/python3.8/dist-packages/nltk/downloader.py", line 823, in download show( File "/usr/local/lib/python3.8/dist-packages/nltk/downloader.py", line 769, in show print_to( File "/usr/local/lib/python3.8/dist-packages/enrich/console.py", line 50, in print super().print(*args, **kwargs) TypeError: print() got an unexpected keyword argument 'file'

qiurigao avatar Apr 19 '24 06:04 qiurigao