Pupyl fails to index images. I have tried with different sets of images, but it always fails. After importing and scanning all images, a FileIsNotImage
exception is raised.
import os
from pathlib import Path
from pupyl.search import PupylImageSearch
p = PupylImageSearch(os.path.join(Path.home(), 'pupyl'))
p.index('https://github.com/policratus/pupyl/raw/main/samples/images.tar.xz')
...π Scanning images: 594 items.
FileNotFoundError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Code\dragonvale\dragonvale_env\lib\site-packages\pupyl\search.py", line 285, in index
futures = {
File "c:\Code\dragonvale\dragonvale_env\lib\site-packages\pupyl\search.py", line 291, in <dictcomp>
self.image_database.load_image_metadata(
File "c:\Code\dragonvale\dragonvale_env\lib\site-packages\pupyl\storage\database.py", line 274, in load_image_metadata
raise IndexError(
IndexError: Index not found: 106
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "c:\Users\amroo\.vscode\extensions\ms-python.python-2022.12.0\pythonFiles\lib\python\debugpy\__main__.py", line 39, in <module>
cli.main()
File "c:\Users\amroo\.vscode\extensions\ms-python.python-2022.12.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 430, in main
run()
File "c:\Users\amroo\.vscode\extensions\ms-python.python-2022.12.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "c:\Users\amroo\.vscode\extensions\ms-python.python-2022.12.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "c:\Users\amroo\.vscode\extensions\ms-python.python-2022.12.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "c:\Users\amroo\.vscode\extensions\ms-python.python-2022.12.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "c:\Code\dragonvale\imagematch.py", line 6, in <module>
p.index('https://github.com/policratus/pupyl/raw/main/samples/images.tar.xz')
File "c:\Code\dragonvale\dragonvale_env\lib\site-packages\pupyl\search.py", line 307, in index
raise FileIsNotImage('Please, check your input images.') \
pupyl.duplex.exceptions.FileIsNotImage: Please, check your input images.
* OS: Windows 11; Version 10.0.22622 Build 22622
* Python: 3.10.5
* Pupyl: 0.14.0