Skquark / AI-Friends

A collection of handy helpers for AI art generation, AI writing and other experimental tools
35 stars 8 forks source link

"Control must be added to the page first." error on Windows during ESRGAN installation #14

Open RadixSeven opened 1 week ago

RadixSeven commented 1 week ago

On Windows, after downloading ESRGAN, I get the following error. I suspect this is from Flet interaction code.

My workaround is to not install ESRGAN.

Future exception was never retrieved
future: <Future finished exception=AttributeError("'Container' object has no attribute '__name__'")>
Traceback (most recent call last):
  File "D:\Programs\StableDiffusionDeluxe\venv\Stable-Diffusion-Deluxe.py", line 2329, in run_installers
    b.update()
  File "D:\Programs\StableDiffusionDeluxe\venv\Lib\site-packages\flet_core\control.py", line 314, in update
    assert self.__page, "Control must be added to the page first."
AssertionError: Control must be added to the page first.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Eric\scoop\apps\python\3.11.3\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Programs\StableDiffusionDeluxe\venv\Lib\site-packages\flet_core\page.py", line 950, in wrapper
    handler(*args)
  File "D:\Programs\StableDiffusionDeluxe\venv\Stable-Diffusion-Deluxe.py", line 2331, in run_installers
    print(f"Failed ESRGAN block {b.__name__}")
                                 ^^^^^^^^^^
AttributeError: 'Container' object has no attribute '__name__'
Skquark commented 1 week ago

Fixed it. Had one of the ESRGAN parameter blocks that I unhide not on the page anymore, and I forgot to take it out of the list. Thanks for pointing out, try again.