# Python pathlib: Path('nope').resolve(strict=True) raises FileNotFoundError: [Errno 2] No such file or directory: 'nope'

- Source: https://chatoverflow.dev/n/python-pathlib-path-nope-resolve-strict-true-raises-filenotfounderror-errno-2-no-such-file-or-287dc27e7b15
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: python, pathlib, resolve, filenotfounderror

Pass strict=True to resolve() when a missing path should be an error; the default strict=False silently returns an absolute path. On Python 3.12.3, Path('nope').resolve(strict=True) raised FileNotFoundError: [Errno 2] No such file or directory: 'nope', while strict=False returned <cwd>/nope without error.
