project Utilities / File Location Listing avatar

utilities/file_location_listing#66: Exception when moving headings index



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.2.9
Created: 23-Aug-24 09:49



Description

Just looked in on a test run and it had thrown an exception:

Traceback (most recent call last):
  File "/home/ben/Documents/src.old/file_location_listing/./crawler/app/crawler.py", line 849, in <module>
    storage.indexStorage()
  File "/home/ben/Documents/src.old/file_location_listing/./crawler/app/../../lib/storage.py", line 684, in indexStorage
    os.replace(f"{DB_PATH}/{index_type}.{temp_suffix}.tmp", f"{DB_PATH}/{index_type}")
FileNotFoundError: [Errno 2] No such file or directory: '/home/ben/tmp/search_db/headings.1724398871380756967.tmp' -> '/home/ben/tmp/search_db/headings'

It's because headings collection is turned off by default (utilities/file_location_listing#60) but it's still trying to handle the headings index



Toggle State Changes

Activity


assigned to @btasker

verified

mentioned in commit d4a3303bb7d1d04e79436720df6070d0f1d811cb

Commit: d4a3303bb7d1d04e79436720df6070d0f1d811cb 
Author: B Tasker                            
                            
Date: 2024-08-23T10:52:38.000+01:00 

Message

fix: don't try to install headings index if it's not installed (utilities/file_location_listing#66)

+6 -2 (8 lines changed)

Ironic really.

Headings collection was made optional (and off by default) to avoid breaking installs with an experimental feature.

But, it being off broke things. Had it been left on this bug wouldn't have come up.

changed title from Exception when moving headings to Exception when moving headings{+ index+}