Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None Character Error #4320

Closed
1 task done
TheCyberViking opened this issue Oct 18, 2023 · 9 comments
Closed
1 task done

None Character Error #4320

TheCyberViking opened this issue Oct 18, 2023 · 9 comments
Labels
bug Something isn't working stale

Comments

@TheCyberViking
Copy link

Describe the bug

I had no issues before a recent update. I performed an update to the latest version, and now I have the error popping up "ERROR:Could not find the character "None" inside characters/. No character has been loaded.". I was able to solve the issue using the character card which was a simple assistant and called it none.json, A good chance of a simple fix would be to have a character that is a simple assistant named None pre-loaded into the character folder on update or download

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

update and try Loading the Web-UI or refreshing the Web-UI causes the error to popup

Screenshot

No response

Logs

2023-XX-XX XX:XX:XX ERROR:Could not find the character "None" inside characters/. No character has been loaded.
Traceback (most recent call last):
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\gradio\queueing.py", line 406, in call_prediction
    output = await route_utils.call_process_api(
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\gradio\blocks.py", line 1554, in process_api
    result = await self.call_function(
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\gradio\blocks.py", line 1192, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "H:\text-generation-webui\installer_files\env\lib\site-packages\gradio\utils.py", line 659, in wrapper
    response = f(*args, **kwargs)
  File "H:\text-generation-webui\modules\chat.py", line 561, in load_character
    raise ValueError

System Info

Windows 10, Latest Patches, Latest update of the Web-UI
@TheCyberViking TheCyberViking added the bug Something isn't working label Oct 18, 2023
@github-actions github-actions bot added the stale label Nov 29, 2023
Copy link

This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.

@Woisek
Copy link

Woisek commented Dec 1, 2023

This still exists ...

@sirus20x6
Copy link

2023-12-19 02:25:25 ERROR:Could not find the character "None" inside characters/. No character has been loaded.
Traceback (most recent call last):
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/gradio/queueing.py", line 407, in call_prediction
    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/gradio/route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/gradio/blocks.py", line 1550, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/gradio/blocks.py", line 1185, in call_function
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/installer_files/env/lib/python3.11/site-packages/gradio/utils.py", line 661, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "/code/git/ob/text-generation-webui/modules/chat.py", line 593, in load_character
    raise ValueError
ValueError

@LemgonUltimate
Copy link

Yeah I have the exact same error. It loads my character card and everything is working fine but the error message is a bit annoying every start.

@Mathias9807
Copy link

I had this error too and apparently my config was the issue. In settings.yaml the character field had a value of "None"... Solved by setting it to "Assistant".

@arleas
Copy link

arleas commented Jan 29, 2024

I'm getting this same error except instead of "none" it's "[]" (Open and close brackets). I don't know what else to do but make a fake character named "[]" but eventually it crashes gradio...

@showkeyjar
Copy link

same +1

@ratzycon
Copy link

getting this as well,

first thought it was a image cache problem when characters starts to have wrong portraits, but it seems like there might be a parsing error or something in the json chat log

Could not find the character "[]" inside characters/. No character has been loaded.
Traceback (most recent call last):
...
File "/home/xxx/text-generation-webui/modules/chat.py", line 663, in load_character
raise ValueError

@kimdonghwi94
Copy link

This error is an error that comes out when reloading because the character value is not received properly.

Fix file "text-generation-webui/modules/chat.py Line 661"

def load_character(character, name1, name2):
    context = greeting = ""
    greeting_field = 'greeting'
    picture = None

to

def load_character(character, name1, name2):
    if character is None or (not character):
        character = 'Assistant'

    context = greeting = ""
    greeting_field = 'greeting'
    picture = None

It works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

9 participants