最新版本的 ComfyUI 在 GBK 编码下遇到特殊的 utf-8 编码的插件,会抛异常
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Expected Behavior
正常来说,应该正常启动,载入 BizyAir 插件。
### Actual Behavior
如题。
```python
Traceback (most recent call last):
File "G:\ComfyUI\python_embeded\Lib\logging_init_.py", line 1113, in emit
stream.write(msg + self.terminator)
File "G:\ComfyUI\ComfyUI\app\logger.py", line 32, in write
super().write(data)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2601' in position 14: illegal multibyte sequence
```
这个是相关 issue:https://github.com/siliconflow/BizyAir/issues/363#issue-2910537785
### Steps to Reproduce
安装最新的 ComfyUI + BizyAir,在 windows 系统、gbk 编码的控制台下。启动 ComfyUI
### Debug Logs
```powershell
Traceback (most recent call last):
File "G:\ComfyUI\python_embeded\Lib\logging_init_.py", line 1113, in emit
stream.write(msg + self.terminator)
File "G:\ComfyUI\ComfyUI\app\logger.py", line 32, in write
super().write(data)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2601' in position 14: illegal multibyte sequence
Call stack:
File "G:\ComfyUI\ComfyUI\main.py", line 299, in
event_loop, _, start_all_func = start_comfyui()
File "G:\ComfyUI\ComfyUI\main.py", line 263, in start_comfyui
nodes.init_extra_nodes(init_custom_nodes=not args.disable_all_custom_nodes)
File "G:\ComfyUI\ComfyUI\nodes.py", line 2280, in init_extra_nodes
init_external_custom_nodes()
File "G:\ComfyUI\ComfyUI\nodes.py", line 2188, in init_external_custom_nodes
success = load_custom_node(module_path, base_node_names, module_parent="custom_nodes")
File "G:\ComfyUI\ComfyUI\nodes.py", line 2140, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\ComfyUI\custom_nodes\BizyAir_init_.py", line 1, in
from bizyengine import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine_init_.py", line 6, in
import bizyengine.bizyair_extras
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras_init_.py", line 2, in
from .nodes_cogview4 import *
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras\nodes_cogview4.py", line 4, in
class CogView4_6B_Pipe(BizyAirBaseNode):
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 102, in init_subclass
register_node(cls, PREFIX)
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 55, in register_node
logger.warning(
Message: "Display name '☁️BizyAir CogView4_6B_Pipe' might differ from the native display name."
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "G:\ComfyUI\python_embeded\Lib\logging_init_.py", line 1113, in emit
stream.write(msg + self.terminator)
File "G:\ComfyUI\ComfyUI\app\logger.py", line 32, in write
super().write(data)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2601' in position 14: illegal multibyte sequence
Call stack:
File "G:\ComfyUI\ComfyUI\main.py", line 299, in
event_loop, _, start_all_func = start_comfyui()
File "G:\ComfyUI\ComfyUI\main.py", line 263, in start_comfyui
nodes.init_extra_nodes(init_custom_nodes=not args.disable_all_custom_nodes)
File "G:\ComfyUI\ComfyUI\nodes.py", line 2280, in init_extra_nodes
init_external_custom_nodes()
File "G:\ComfyUI\ComfyUI\nodes.py", line 2188, in init_external_custom_nodes
success = load_custom_node(module_path, base_node_names, module_parent="custom_nodes")
File "G:\ComfyUI\ComfyUI\nodes.py", line 2140, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\ComfyUI\custom_nodes\BizyAir_init_.py", line 1, in
from bizyengine import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine_init_.py", line 6, in
import bizyengine.bizyair_extras
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras_init_.py", line 7, in
from .nodes_controlnet import *
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras\nodes_controlnet.py", line 5, in
class SetUnionControlNetType(BizyAirBaseNode):
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 102, in init_subclass
register_node(cls, PREFIX)
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 55, in register_node
logger.warning(
Message: "Display name '☁️BizyAir SetUnionControlNetType' might differ from the native display name."
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "G:\ComfyUI\python_embeded\Lib\logging_init_.py", line 1113, in emit
stream.write(msg + self.terminator)
File "G:\ComfyUI\ComfyUI\app\logger.py", line 32, in write
super().write(data)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2601' in position 14: illegal multibyte sequence
Call stack:
File "G:\ComfyUI\ComfyUI\main.py", line 299, in
event_loop, _, start_all_func = start_comfyui()
File "G:\ComfyUI\ComfyUI\main.py", line 263, in start_comfyui
nodes.init_extra_nodes(init_custom_nodes=not args.disable_all_custom_nodes)
File "G:\ComfyUI\ComfyUI\nodes.py", line 2280, in init_extra_nodes
init_external_custom_nodes()
File "G:\ComfyUI\ComfyUI\nodes.py", line 2188, in init_external_custom_nodes
success = load_custom_node(module_path, base_node_names, module_parent="custom_nodes")
File "G:\ComfyUI\ComfyUI\nodes.py", line 2140, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\ComfyUI\custom_nodes\BizyAir_init_.py", line 1, in
from bizyengine import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine_init_.py", line 6, in
import bizyengine.bizyair_extras
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras_init_.py", line 7, in
from .nodes_controlnet import *
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras\nodes_controlnet.py", line 21, in
class ControlNetInpaintingAliMamaApply(BizyAirBaseNode):
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 102, in init_subclass
register_node(cls, PREFIX)
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 55, in register_node
logger.warning(
Message: "Display name '☁️BizyAir ControlNetInpaintingAliMamaApply' might differ from the native display name."
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "G:\ComfyUI\python_embeded\Lib\logging_init_.py", line 1113, in emit
stream.write(msg + self.terminator)
File "G:\ComfyUI\ComfyUI\app\logger.py", line 32, in write
super().write(data)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2601' in position 14: illegal multibyte sequence
Call stack:
File "G:\ComfyUI\ComfyUI\main.py", line 299, in
event_loop, _, start_all_func = start_comfyui()
File "G:\ComfyUI\ComfyUI\main.py", line 263, in start_comfyui
nodes.init_extra_nodes(init_custom_nodes=not args.disable_all_custom_nodes)
File "G:\ComfyUI\ComfyUI\nodes.py", line 2280, in init_extra_nodes
init_external_custom_nodes()
File "G:\ComfyUI\ComfyUI\nodes.py", line 2188, in init_external_custom_nodes
success = load_custom_node(module_path, base_node_names, module_parent="custom_nodes")
File "G:\ComfyUI\ComfyUI\nodes.py", line 2140, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\ComfyUI\custom_nodes\BizyAir_init_.py", line 1, in
from bizyengine import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine_init_.py", line 6, in
import bizyengine.bizyair_extras
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras_init_.py", line 8, in
from .nodes_custom_sampler import *
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\bizyair_extras\nodes_custom_sampler.py", line 4, in
class DisableNoise(BizyAirBaseNode):
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 102, in init_subclass
register_node(cls, PREFIX)
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine\core\nodes_base.py", line 55, in register_node
logger.warning(
Message: "Display name '☁️BizyAir DisableNoise' might differ from the native display name."
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "G:\ComfyUI\python_embeded\Lib\logging_init_.py", line 1113, in emit
stream.write(msg + self.terminator)
File "G:\ComfyUI\ComfyUI\app\logger.py", line 32, in write
super().write(data)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2601' in position 14: illegal multibyte sequence
Call stack:
File "G:\ComfyUI\ComfyUI\main.py", line 299, in
event_loop, _, start_all_func = start_comfyui()
File "G:\ComfyUI\ComfyUI\main.py", line 263, in start_comfyui
nodes.init_extra_nodes(init_custom_nodes=not args.disable_all_custom_nodes)
File "G:\ComfyUI\ComfyUI\nodes.py", line 2280, in init_extra_nodes
init_external_custom_nodes()
File "G:\ComfyUI\ComfyUI\nodes.py", line 2188, in init_external_custom_nodes
success = load_custom_node(module_path, base_node_names, module_parent="custom_nodes")
File "G:\ComfyUI\ComfyUI\nodes.py", line 2140, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\ComfyUI\custom_nodes\BizyAir_init_.py", line 1, in
from bizyengine import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "G:\ComfyUI\python_embeded\Lib\site-packages\bizyengine_init_.py", line 6, in
import bizyengine.bizyair_extras
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.