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

[BUG]请加一个自定义任务禁用中文名称的检查,不然会报错 #179

Open
Pevernow opened this issue Aug 6, 2024 · 0 comments
Assignees

Comments

@Pevernow
Copy link

Pevernow commented Aug 6, 2024

Traceback (most recent call last):
File "C:\Users\34503\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebio\session\threadbased.py", line 261, in run
callback(event['data'])
File "C:\Users\34503\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebio\output.py", line 843, in click_callback
return onclick(btn_val)
File "C:\code\genshin_impact_assistant\source\webio\page_manager.py", line 24, in load_page
self.page_dict[idx].load()
File "C:\code\genshin_impact_assistant\source\webio\page.py", line 17, in load
self._on_load()
File "C:\code\genshin_impact_assistant\source\webio\advance_page.py", line 31, in _on_load
super()._on_load()
File "C:\code\genshin_impact_assistant\source\webio\page.py", line 27, in _on_load
self._load() # 加载主页
File "C:\code\genshin_impact_assistant\source\webio\webpages\mission.py", line 183, in _load
self._render_scopes()
File "C:\code\genshin_impact_assistant\source\webio\webpages\mission.py", line 58, in render_scopes
grid_content[i//3].append(output.put_scope(f"{self.missions[i]}").style('border: 1px solid #ccc; border-radius: 16px'))
File "C:\Users\34503\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebio\io_ctrl.py", line 193, in inner
return func(*args, **kwargs)
File "C:\Users\34503\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebio\output.py", line 1470, in put_scope
check_dom_name_value(name, 'scope name')
File "C:\Users\34503\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebio\utils.py", line 383, in check_dom_name_value
raise ValueError(name + " can only contain letters, digits, "
ValueError: scope name can only contain letters, digits, hyphens ('-') and underscore ('
')

自定义任务用中文名就这样了。页面直接空白。

@infstellar infstellar self-assigned this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants