toshiaki1729 / dataset-tag-editor-standalone

WebUI to edit dataset captions for txt2img models
MIT License
129 stars 13 forks source link

On windows 11 with Python 3.10.6, unable to load the database directory #25

Closed FilkerZero closed 4 months ago

FilkerZero commented 11 months ago

When I launch the program by double-clicking launch_user.bat in the checkout directory, it comes up with no errors on the console. I set the dataset directory to D:\ai-tagged, selected BLIP and DeepDanbooru as interrogators.

When I hit the "Load" key, I get the following in the console window (starting at the line Task exception was never retrieved):

Volume in drive D is Fast-Data
 Volume Serial Number is B05B-6006

 Directory of D:\ai-tools\dataset-tag-editor-standalone\venv\Scripts

09/23/2023  10:14 AM           266,664 python.exe
               1 File(s)        266,664 bytes
               0 Dir(s)  1,224,441,315,328 bytes free
PyTorch device: cuda
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Task exception was never retrieved
future: <Task finished name='e5iar4yhenj_5' coro=<Queue.process_events() done, defined at D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 5, 'data': [...on_hash': 'e5iar4yhenj'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing>
Traceback (most recent call last):
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events
    client_awake = await self.gather_event_data(event)
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 220, in gather_event_data
    data, client_awake = await self.get_message(event, timeout=receive_timeout)
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 456, in get_message
    return PredictBody(**data), True
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\pydantic\main.py", line 165, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 5, 'data': [...on_hash': 'e5iar4yhenj'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
Task exception was never retrieved
future: <Task finished name='e5iar4yhenj_7' coro=<Queue.process_events() done, defined at D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 7, 'data': [...on_hash': 'e5iar4yhenj'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing>
Traceback (most recent call last):
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events
    client_awake = await self.gather_event_data(event)
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 220, in gather_event_data
    data, client_awake = await self.get_message(event, timeout=receive_timeout)
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 456, in get_message
    return PredictBody(**data), True
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\pydantic\main.py", line 165, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 7, 'data': [...on_hash': 'e5iar4yhenj'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing
Task exception was never retrieved
future: <Task finished name='e5iar4yhenj_44' coro=<Queue.process_events() done, defined at D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 44, 'data': ...on_hash': 'e5iar4yhenj'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing>
Traceback (most recent call last):
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 347, in process_events
    client_awake = await self.gather_event_data(event)
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 220, in gather_event_data
    data, client_awake = await self.get_message(event, timeout=receive_timeout)
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\gradio\queueing.py", line 456, in get_message
    return PredictBody(**data), True
  File "D:\ai-tools\dataset-tag-editor-standalone\venv\lib\site-packages\pydantic\main.py", line 165, in __init__
    __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody
event_id
  Field required [type=missing, input_value={'fn_index': 44, 'data': ...on_hash': 'e5iar4yhenj'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.3/v/missing

It looks like there is an incompatibility in the parameters call to PredictBody but I'm not very well versed in Python and solving problems therein.

Is this a known problem? Is it an issue with my installation, and if so, is there a way to configure my system to solve it?

edit While reading imperfect matches in other open issues, I found a similar issue that had a reply (https://github.com/toshiaki1729/dataset-tag-editor-standalone/issues/22#issuecomment-1665399779) which said to install fastapi==0.95.2, so I got farther along, however I have a new issue that I need to track down. If I don't find a solution for that, I will create a new issue, since it's not the same problem.

milkevolii commented 10 months ago

installing fastapi==0.95.2 worked for me

toshiaki1729 commented 4 months ago

I've updated gradio to 4.28.3 in >= ver0.0.6. Version related issue may be solved. I'm grad if you can check it.