TypeError: expected str, bytes or os.PathLike object, not NoneType
Closed this issue · 5 comments
Hello, it seems that save_dir
is not created before saving ply files.
We have updated the code to create directory if it does not exists.
there are other reasons for this error, In the 'luciddreamer.py' file, the 'save_dir' parameter of the 'LucidDreamer' class has a default value of None, and the save_dir is not passed when instantiating the LucidDreamer class in the app.py file, causing the program to run with the default value None, which causes the luciddreamer.py file to be executed to line 193
. Trying to concatenate None with a string resulted in this error, which I avoided by changing the default value of the LucidDreamer class parameter save_dir to "./".
there are other reasons for this error, In the 'luciddreamer.py' file, the 'save_dir' parameter of the 'LucidDreamer' class has a default value of None, and the save_dir is not passed when instantiating the LucidDreamer class in the app.py file, causing the program to run with the default value None, which causes the luciddreamer.py file to be executed to line 193 . Trying to concatenate None with a string resulted in this error, which I avoided by changing the default value of the LucidDreamer class parameter save_dir to "./".
I modified it according to your instructions, but still got an error. Do I want to revert line 193 to before this version?
there are other reasons for this error, In the 'luciddreamer.py' file, the 'save_dir' parameter of the 'LucidDreamer' class has a default value of None, and the save_dir is not passed when instantiating the LucidDreamer class in the app.py file, causing the program to run with the default value None, which causes the luciddreamer.py file to be executed to line 193 . Trying to concatenate None with a string resulted in this error, which I avoided by changing the default value of the LucidDreamer class parameter save_dir to "./".
I modified it according to your instructions, but still got an error. Do I want to revert line 193 to before this version?
Please undo the change, line 193 is the place where the error is reported, not the cause of the error, I mean to change the
def init(self, for_gradio=True, save_dir=None):
in line 59 of the luciddreamer.py file to
def init(self, for_gradio=True, save_dir="./"):
Thanks to @mikeyimer and @Asuior for pointing out the errors and the solutions.
We have updated app.py and app_mini.py to prevent the error.