babysor / babysor/MockingBird

An error occurs using the VC mode of the Web page

Open
#938 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

**Summary[问题简述(一句话)]**
After I was able to run successfully using GUI mode, running the Web page to open VC mode reported an error:
`TypeError: Attempted to reuse key: '24epoch.pt'`

**Env & To Reproduce[复现与环境]**
```
File "C:\Users\ID3\anaconda3\envs\DeepLearning\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "C:\Users\ID3\AppData\Local\Temp\tmpdkez639n.py", line 13, in
render_streamlit_ui()
File "D:\mockingBirdTest\MockingBird\control\mkgui\base\ui\streamlit_ui.py", line 879, in render_streamlit_ui
opyrator = getOpyrator(mode)
File "D:\mockingBirdTest\MockingBird\control\mkgui\base\ui\streamlit_ui.py", line 849, in getOpyrator
from control.mkgui.app_vc import convert
File "D:\mockingBirdTest\MockingBird\control\mkgui\app_vc.py", line 33, in
extractors = Enum('extractors', list((file.name, file) for file in Path(EXT_MODELS_DIRT).glob("**/*.pt")))
File "C:\Users\ID3\anaconda3\envs\DeepLearning\lib\enum.py", line 341, in __call__
return cls._create_(
File "C:\Users\ID3\anaconda3\envs\DeepLearning\lib\enum.py", line 464, in _create_
classdict[member_name] = member_value
File "C:\Users\ID3\anaconda3\envs\DeepLearning\lib\enum.py", line 112, in __setitem__
raise TypeError('Attempted to reuse key: %r' % key)
```
If you can help me, thank you very much!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in control/mkgui/app_vc.py at the extractors Enum definition and inspect the .pt files under EXT_MODELS_DIRT, then trace how streamlit_ui.py imports it for VC mode. Done means the Web page can open VC mode without the duplicate-key error and the existing model choices still load correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, streamlit
Domain
ai, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.