luciddreamer-cvlab/LucidDreamer

TypeError: expected str, bytes or os.PathLike object, not NoneType

Closed this issue · 5 comments

An error occurred during the generation process :
捕获111

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
image
. 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 "./".
image

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 image . 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 "./". image

I modified it according to your instructions, but still got an error. Do I want to revert line 193 to before this version?
捕获99

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 image . 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 "./". image

I modified it according to your instructions, but still got an error. Do I want to revert line 193 to before this version? 捕获99

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="./"):
image

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.