nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

Cannot run viewer in windows due to error "NotImplementedError: cannot instantiate 'PosixPath' on your system"

Open ShnitzelKiller opened this issue 2 years ago • 3 comments

Describe the bug On Windows, when running the ns-viewer command with a valid path to a config file, the error "NotImplementedError: cannot instantiate 'PosixPath' on your system" occurs. Strangely, ns-train works, as does the corresponding web viewer while it's training. I just cannot view a trained model after it's done.

To Reproduce Steps to reproduce the behavior:

  1. Be running windows
  2. try to run ns-viewer

Expected behavior It should not crash

ShnitzelKiller avatar Aug 14 '23 02:08 ShnitzelKiller

I've never used Windows so I'm not entirely sure, maybe if you check the line of code the error is being thrown from you might be able to tell what's going on? maybe you don't have permission to access the directory or etc

kerrj avatar Aug 14 '23 17:08 kerrj

I assumed this was a system compatibility error, since PosixPath in pathlib is not implemented in Windows.

ShnitzelKiller avatar Aug 15 '23 01:08 ShnitzelKiller

I think the issue is storing all paths in yaml files as PosixPaths instead of strings. We could perhaps implement custom yaml loader/serialization to avoid the issue? For now can you please find and replace all PosixPath with Path in the yaml config?

jkulhanek avatar Aug 17 '23 19:08 jkulhanek