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

windows: strange crash when I select a model. #73

Closed
amonpaike opened this issue Apr 5, 2024 · 1 comment · Fixed by #75
Closed

windows: strange crash when I select a model. #73

amonpaike opened this issue Apr 5, 2024 · 1 comment · Fixed by #75
Labels
bug Something isn't working

Comments

@amonpaike
Copy link

Windows: strange crash when I select a model.
Then once restarted oterm everything works correctly, including the window with the selected LLM is already ready to work.

image

`╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\Users\noki\AppData\Local\Programs\Python\Python311\Lib\site-packages\oterm\app\oterm.py:89 in on_tab_activated │
│ │
│ 86 │ @on(TabbedContent.TabActivated) │
│ 87 │ async def on_tab_activated(self, event: TabbedContent.TabActivated) -> None: │
│ 88 │ │ container = event.pane.query_one(ChatContainer) │
│ ❱ 89 │ │ await container.load_messages() │
│ 90 │ │
│ 91 │ def compose(self) -> ComposeResult: │
│ 92 │ │ yield Header() │
│ │
│ ╭───────────────────────── locals ─────────────────────────╮ │
│ │ container = ChatContainer() │ │
│ │ event = TabActivated( │ │
│ │ │ TabbedContent(id='tabs'), │ │
│ │ │ ContentTab(id='--content-tab-chat-53'), │ │
│ │ │ TabPane(id='chat-53') │ │
│ │ ) │ │
│ │ self = OTerm(title='oTerm', classes={'-dark-mode'}) │ │
│ ╰──────────────────────────────────────────────────────────╯ │
│ │
│ C:\Users\noki\AppData\Local\Programs\Python\Python311\Lib\site-packages\oterm\app\widgets\chat.py:87 in │
│ load_messages │
│ │
│ 84 │ async def load_messages(self) -> None: │
│ 85 │ │ if self.loaded: │
│ 86 │ │ │ return │
│ ❱ 87 │ │ message_container = self.query_one("#messageContainer") │
│ 88 │ │ for author, message in self.messages: │
│ 89 │ │ │ chat_item = ChatItem() │
│ 90 │ │ │ chat_item.text = message │
│ │
│ ╭──────── locals ────────╮ │
│ │ self = ChatContainer() │ │
│ ╰────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
NoMatches: No nodes match on ChatContainer()

NOTE: 1 of 2 errors shown. Run with textual run --dev to see all errors.`

@ggozad
Copy link
Owner

ggozad commented Apr 14, 2024

Sorry for the delay I had completely forgotten about this :(
I cannot reproduce on my machine and my guess is this is a timing issue. So we have to make some guesses and I will need your help to test.
Could you please try out installing from the branch 73-windows-strange-crash-when-i-select-a-model and let me know if the problem is fixed?

@ggozad ggozad added the bug Something isn't working label Apr 14, 2024
@ggozad ggozad linked a pull request Apr 18, 2024 that will close this issue
ggozad added a commit that referenced this issue Apr 18, 2024
…lect-a-model

Await adding a new tab pane before activating it. Closes #73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants