[BUG] <title> 在mac arm64上无法打开 "Manage Models"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 26.4k
- Forks
- 2.1k
- Avg merge
- 14h 39m
- Merged PRs (30d)
- 3
Description
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
- 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
- 我已经搜索过FAQ | I have searched FAQ
当前行为 | Current Behavior
在mac arm64上无法打开 "Manage Models"
核心问题已确认:NSPopUpButton 在 _refresh_model_manager_content
方法中作为局部变量使用时未定义。这是一个典型的 Python 变量作用域 bug。
onManageModels_ 2026-04-29 09:24:40,072 [ERROR] comni: onManageModels_ failed Traceback (most recent call last): File "/Applications/Comni.app/Contents/Resources/apps/desktop/menubar_app.py", line 2150, in onManageModels_ self._build_model_manager() File "/Applications/Comni.app/Contents/Resources/apps/desktop/menubar_app.py", line 1119, in _build_model_manager self._refresh_model_manager_content() File "/Applications/Comni.app/Contents/Resources/apps/desktop/menubar_app.py", line 1151, in _refresh_model_manager_content self._download_source_popup = NSPopUpButton.alloc().initWithFrame_pullsDown_( ^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'NSPopUpButton' where it is not associated with a value 2026-04-29 09:24:45,251 [INFO] comni: onManageModels_ 2026-04-29 09:24:45,255 [ERROR] comni: onManageModels_ failed Traceback (most recent call last): File "/Applications/Comni.app/Contents/Resources/apps/desktop/menubar_app.py", line 2150, in onManageModels_ self._build_model_manager() File "/Applications/Comni.app/Contents/Resources/apps/desktop/menubar_app.py", line 1099, in _build_model_manager self._refresh_model_manager_content() File "/Applications/Comni.app/Contents/Resources/apps/desktop/menubar_app.py", line 1151, in _refresh_model_manager_content self._download_source_popup = NSPopUpButton.alloc().initWithFrame_pullsDown_( ^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'NSPopUpButton' where it is not associated with a value
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):
备注 | Anything else?
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in menubar_app.py at _refresh_model_manager_content, called by _build_model_manager when Manage Models is opened. Reproduce the action on macOS arm64, inspect the traceback around line 1151, and verify that Manage Models opens without the reported UnboundLocalError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100