You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to the fact Windows bans these characters.
The fix for this would be to use a regex to filter out and replace the characters with something like an underscore (_) in the output file. The only current fix is to go in the png file, grab the encoded base64 at the end and decode, change the special character and go back to encoding and forth, which is annoying.
Is there an existing issue for this?
I have searched the existing issues
Reproduction
Grab any character with the banned windows file characters (\ / : * ? " < > |) as their name
Try to upload the character file
Screenshot
Logs
Traceback (most recent call last):
File "D:\AI\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 527, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 261, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1786, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1338, in call_function
prediction = await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\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 "D:\AI\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 759, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\modules\chat.py", line 850, in upload_tavern_character
return upload_character(json.dumps(_json), img, tavern=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\text-generation-webui-main\modules\chat.py", line 823, in upload_character
with open(Path(f'characters/{outfile_name}.yaml'), 'w', encoding='utf-8') as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: 'characters\\test.yaml'
### System Info
```shell
Windows
NVIDIA RTX
--
Note: I'm not sure if this can happen on Mac and Linux too, but it would be still interesting to look at.
The text was updated successfully, but these errors were encountered:
I will admit I saw this issue first in silly tavern but then it also applied to textgen.
Pretty much sillytavern could import and even save the file that contained emojis but the moment you try to load it up after a full restart it will fail.
you can also run into this issue if you are dualbooting windows and linux and are accessing the data files via a symlink to hardrive that is btrfs formatted and shared between both operating systems.
Describe the bug
The following line of code produces the error.
text-generation-webui/modules/chat.py
Line 823 in cc8c7ed
This is due to the fact Windows bans these characters.
The fix for this would be to use a regex to filter out and replace the characters with something like an underscore (
_
) in the output file. The only current fix is to go in the png file, grab the encoded base64 at the end and decode, change the special character and go back to encoding and forth, which is annoying.Is there an existing issue for this?
Reproduction
\ / : * ? " < > |
) as their nameScreenshot
Logs
The text was updated successfully, but these errors were encountered: