Closed iannesbitt closed 1 year ago
Another instance of this problem pops up when using pathlib.Path(f).unlink()
to remove a file. The process throws a FileNotFoundError
even if the file exists and is deleted successfully.
2023-04-12T15:12:57:INFO: Starting merge process in 3dtiles
Traceback (most recent call last):
File "/home/nesbitt/miniconda3/envs/workflow/bin/tilepoints", line 8, in <module>
sys.exit(cli())
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/pdgpoints/cli.py", line 42, in cli
p.run()
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/pdgpoints/pipeline.py", line 79, in run
py3dtiles_iface.merge(dir=self.out_dir,
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/pdgpoints/py3dtiles_iface.py", line 54, in merge
merger.merge_from_files(tileset_paths=paths,
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/py3dtiles/merger.py", line 277, in merge_from_files
TileSet.from_file(output_tileset_path).delete_on_disk(
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/py3dtiles/tileset/tileset.py", line 102, in delete_on_disk
self.root_tile.delete_on_disk(tileset_path.parent, delete_sub_tileset)
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/py3dtiles/tileset/tile.py", line 117, in delete_on_disk
child.delete_on_disk(root_uri, delete_sub_tileset)
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/py3dtiles/tileset/tile.py", line 117, in delete_on_disk
child.delete_on_disk(root_uri, delete_sub_tileset)
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/py3dtiles/tileset/tile.py", line 117, in delete_on_disk
child.delete_on_disk(root_uri, delete_sub_tileset)
[Previous line repeated 5 more times]
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/site-packages/py3dtiles/tileset/tile.py", line 132, in delete_on_disk
tile_content_path.unlink()
File "/home/nesbitt/miniconda3/envs/workflow/lib/python3.9/pathlib.py", line 1354, in unlink
self._accessor.unlink(self)
FileNotFoundError: [Errno 2] No such file or directory: '/home/shares/drp/pointcloud/3dtiles/r.pnts'
pathlib.Path(f).unlink(missing_ok=True)
is a workaround but os.rename(f, f2)
and pathlib.Path(f).rename(f2)
still throw FileNotFoundError
...
This may be solved by recent changes; closing for now
As referenced in #2, file archival process (here) succeeds in renaming the input file to the
./archive/
directory but throws the following error after doing so:Currently the workaround is an
except FileNotFoundError
. No documented issues with this online, so probably something to do with the setup ondatateam
. Still in search of a solution...