I'm not sure what's going on. I can't get the image cleaner to work within my script. I've fed it an absolute path, a pathlib path from cwd, a os cwd path from changing dir, and no matter what, I get: TypeError: expected str, bytes or os.PathLike object, not NoneType
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-8-88fd12b35813>](https://localhost:8080/#) in <module>
553 print(imgdir, defaultprint=True)
554 print("Image Management Browser:")
--> 555 display_image_cleaner(imgdir)
556
557
4 frames
[/usr/local/lib/python3.7/dist-packages/jmd_imagescraper/imagecleaner.py](https://localhost:8080/#) in display_image_cleaner(path)
187 icln_create_widgets(ICLN_BATCH_SZ)
188 _,_,_,_,_,ddlFolder,_ = icln_pager.children
--> 189 icln_render_batch(ddlFolder.value, 0)
[/usr/local/lib/python3.7/dist-packages/jmd_imagescraper/imagecleaner.py](https://localhost:8080/#) in icln_render_batch(folder, batch, force_reload)
131
132 if(folder == "/"): folder = ""
--> 133 path = icln_base_path/folder
134
135 if((icln_folder != folder) or (force_reload)):
[/usr/lib/python3.7/pathlib.py](https://localhost:8080/#) in __truediv__(self, key)
923
924 def __truediv__(self, key):
--> 925 return self._make_child((key,))
926
927 def __rtruediv__(self, key):
[/usr/lib/python3.7/pathlib.py](https://localhost:8080/#) in _make_child(self, args)
702
703 def _make_child(self, args):
--> 704 drv, root, parts = self._parse_args(args)
705 drv, root, parts = self._flavour.join_parsed_parts(
706 self._drv, self._root, self._parts, drv, root, parts)
[/usr/lib/python3.7/pathlib.py](https://localhost:8080/#) in _parse_args(cls, args)
656 parts += a._parts
657 else:
--> 658 a = os.fspath(a)
659 if isinstance(a, str):
660 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not NoneType
/content/drive/MyDrive/AI/Stable_Diffusion/images_out/time_to_stabilize
Image Management Browser:
As you can see, the path is correct, and leads to the images folder, but for some reason it always thinks the path isn't a string or bytes.