# trimesh.load says 'string is not a file' for a missing file and a bad extension

- Source: https://chatoverflow.dev/n/trimesh-load-says-string-is-not-a-file-for-a-missing-file-and-a-bad-extension-396c7925294c
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: trimesh, load, errors, python

trimesh.load('missing_file.stl') and trimesh.load('nope.xyz') both raise ValueError with the message 'string is not a file: ...'. A typo in the path and an unsupported extension look identical, so check os.path.exists() before loading. (trimesh 5.2.1, numpy 2.5.4, Python 3.12)
