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

[QUESTION] PadddleClas框架中使用Swanlab报错 #637

Closed
wooyeonicon opened this issue Jun 25, 2024 · 3 comments
Closed

[QUESTION] PadddleClas框架中使用Swanlab报错 #637

wooyeonicon opened this issue Jun 25, 2024 · 3 comments
Assignees
Labels
🐛 bug Something isn't working good first issue Good for newcomers 🙋 help wanted Extra attention is needed

Comments

@wooyeonicon
Copy link

🤔 Question description [Please make everyone to understand it]

在PaddleClas框架中tools/train.py加入swanlab.init()报以下错误:

Call stack:
File "tools/train.py", line 37, in
swanlab.init(
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\sdk.py", line 176, in init
run = register(
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\run_init_.py", line 15, in register
run = SwanLabRun(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\run\main.py", line 116, in init
self.__operator.on_run()
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\run\operator.py", line 97, in on_run
return self.__run_all("on_run")
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\run\operator.py", line 54, in __run_all
return {name: getattr(callback, method)(*args, **kwargs) for name, callback in self.callbacks.items()}
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\run\operator.py", line 54, in
return {name: getattr(callback, method)(*args, **kwargs) for name, callback in self.callbacks.items()}
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\callback_cloud.py", line 143, in on_run
experiment_url = self._view_web_print()
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\data\callback_cloud.py", line 82, in _view_web_print
swanlog.info("\U0001f3e0 View project at " + FONT.blue(FONT.underline(project_url)))
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\log\log.py", line 102, in wrapper
can_write = func(self, message, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\swanlab\log\log.py", line 261, in info
self._logger.info(message)
Message: '\U0001f3e0 View project at \x1b[34m\x1b[4mhttps://swanlab.cn/@wooyeon/weed_classification\x1b[0m\x1b[0m'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\logging_init
.py", line 1084, in emit
stream.write(msg + self.terminator)
UnicodeEncodeError: 'gbk' codec can't encode character '\U0001f680' in position 26: illegal multibyte sequence

🧑‍💻 Expected result

🚑 Any additional [like screenshots]

  • SwanLab Version: swanlab 0.3.11

  • Platform: windows10+3090GPU+pytorch2.0.1+cu118�+pycharm2019.2.6

@wooyeonicon wooyeonicon added the 🙋 help wanted Extra attention is needed label Jun 25, 2024
@SAKURA-CAT
Copy link
Contributor

fixed by #636

@SAKURA-CAT
Copy link
Contributor

这是由于系统编码与实际不匹配造成的,您的系统编码应该是gbk,然后swanlab内置输出的了一些emoji表情

目前的策略是如果遇见UnicodeEncodeError不再输出到终端

感谢反馈!

@SAKURA-CAT SAKURA-CAT self-assigned this Jun 26, 2024
@SAKURA-CAT SAKURA-CAT added 🐛 bug Something isn't working good first issue Good for newcomers labels Jun 26, 2024
@Zeyi-Lin
Copy link
Member

新的v0.3.12发布后,您安装应该就可以work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working good first issue Good for newcomers 🙋 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants