QiuYannnn / Local-File-Organizer

An AI-powered file management tool that ensures privacy by organizing local texts, images. Using Llama3.2 3B and Llava v1.6 models with the Nexa SDK, it intuitively scans, restructures, and organizes files for quick, seamless access and easy retrieval.
MIT License
1.72k stars 120 forks source link

Resource punkt_tab not found. #27

Closed adripo closed 1 month ago

adripo commented 1 month ago

Error:


LookupError:
**********************************************************************
  Resource punkt_tab not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('punkt_tab')

  For more information see: https://www.nltk.org/data.html

  Attempted to load tokenizers/punkt_tab/english/

  Searched in:
    - 'C:\\Users\\XXX/nltk_data'
    - 'C:\\Users\\XXX\\.conda\\envs\\local_file_organizer\\nltk_data'
    - 'C:\\Users\\XXX\\.conda\\envs\\local_file_organizer\\share\\nltk_data'
    - 'C:\\Users\\XXX\\.conda\\envs\\local_file_organizer\\lib\\nltk_data'
    - 'C:\\Users\\XXX\\AppData\\Roaming\\nltk_data'
    - 'C:\\nltk_data'
    - 'D:\\nltk_data'
    - 'E:\\nltk_data'

It gives the error just after analyzing a png photo.

MShirazAhmad commented 1 month ago

Same Issue

adripo commented 1 month ago

@MShirazAhmad I fixed the issue in pr #28. You can modify the files locally until it is accepted

QiuYannnn commented 1 month ago

when I execute the full project, punkt_tab fails wirely, even though it works fine when executed separately. There's a bug in the package for MacOS version. So, I replaced punkt_tab with punkt in the early stage of the project. I will fix the bug when working on the Window System. Appreciate it.

leonpawelzik commented 4 weeks ago

Still not working for me, unfortunately. What do I have to change?

galeka commented 2 weeks ago

Sort by Date and Type success, but error when short By Content

Traceback (most recent call last):
  File "/Users/xxx/Local-File-Organizer/main.py", line 337, in <module>
    main()
  File "/Users/xxx/Local-File-Organizer/main.py", line 251, in main
    data_images = process_image_files(image_files, image_inference, text_inference, silent=silent_mode, log_file=log_file)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxxLocal-File-Organizer/image_data_processing.py", line 59, in process_image_files
    data = process_single_image(image_path, image_inference, text_inference, silent=silent, log_file=log_file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxx/Local-File-Organizer/image_data_processing.py", line 36, in process_single_image
    foldername, filename, description = generate_image_metadata(image_path, progress, task_id, image_inference, text_inference)
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xxx/Local-File-Organizer/image_data_processing.py", line 71, in generate_image_metadata
    description_generator = image_inference._chat(description_prompt, image_path)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/nexa_inference_vlm.py", line 332, in _chat
    return self.model.create_chat_completion(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama.py", line 1912, in create_chat_completion
    return handler(
           ^^^^^^^^
  File "/opt/miniconda3/envs/local_file_organizer/lib/python3.12/site-packages/nexa/gguf/llama/llama_chat_format.py", line 2842, in __call__
    if llama.n_tokens + embed.contents.n_image_pos > llama.n_ctx():
                        ^^^^^^^^^^^^^^
ValueError: NULL pointer access

======================

Same error, what should I do?

 LookupError: 
**********************************************************************
  Resource punkt_tab not found.
  Please use the NLTK Downloader to obtain the resource:

  >>> import nltk
  >>> nltk.download('punkt_tab')

  For more information see: https://www.nltk.org/data.html

  Attempted to load tokenizers/punkt_tab/english/

  Searched in:
    - '/Users/xxx/nltk_data'
    - '/opt/miniconda3/envs/local_file_organizer/nltk_data'
    - '/opt/miniconda3/envs/local_file_organizer/share/nltk_data'
    - '/opt/miniconda3/envs/local_file_organizer/lib/nltk_data'
    - '/usr/share/nltk_data'
    - '/usr/local/share/nltk_data'
    - '/usr/lib/nltk_data'
    - '/usr/local/lib/nltk_data'
**********************************************************************

edited, solve by installing manually python -m nltk.downloader all