Changing App's sub_title fails (regression from 0.4.0)
See original GitHub issueSince 0.5.0 (also in main), an exception is thrown when setting my App’s self.app.sub_title
:
Exception in callback SimulationRunnerUI._handle_task_result(True)(<Task finishe...> result=None>)
handle: <Handle SimulationRunnerUI._handle_task_result(True)(<Task finishe...> result=None>)>
Traceback (most recent call last):
File "/apps/hosted/spack/opt/spack/linux-rhel7-haswell/gcc-4.8.5/python-3.10.1-ek76ski4ctzhij7smku7sh3bmupopkou/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/projects/Triton/users/brechtm/triton_alpha/main/tools/chipmunk/simulations/runnerui.py", line 92, in _handle_task_result
self.app.sub_title = "BATCH COMPLETED; EXITING"
File "/projects/Triton/users/brechtm/triton_alpha/main/.venv/lib/python3.10/site-packages/textual/reactive.py", line 190, in __set__
self._check_watchers(obj, name, current_value)
File "/projects/Triton/users/brechtm/triton_alpha/main/.venv/lib/python3.10/site-packages/textual/reactive.py", line 258, in _check_watchers
require_compute = require_compute or invoke_watcher(
File "/projects/Triton/users/brechtm/triton_alpha/main/.venv/lib/python3.10/site-packages/textual/reactive.py", line 236, in invoke_watcher
watch_result = watch_function(value)
File "/projects/Triton/users/brechtm/triton_alpha/main/.venv/lib/python3.10/site-packages/textual/widgets/_header.py", line 134, in set_sub_title
self.query_one(HeaderTitle).sub_text = sub_title
File "/projects/Triton/users/brechtm/triton_alpha/main/.venv/lib/python3.10/site-packages/textual/dom.py", line 728, in query_one
return query.only_one() if expect_type is None else query.only_one(expect_type)
File "/projects/Triton/users/brechtm/triton_alpha/main/.venv/lib/python3.10/site-packages/textual/css/query.py", line 245, in only_one
the_one = self.first(expect_type) if expect_type is not None else self.first()
File "/projects/Triton/users/brechtm/triton_alpha/main/.venv/lib/python3.10/site-packages/textual/css/query.py", line 217, in first
raise NoMatches(f"No nodes match {self!r}")
textual.css.query.NoMatches: No nodes match <DOMQuery Header() filter='HeaderTitle'>
Issue Analytics
- State:
- Created 10 months ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
backstage/CHANGELOG.md at master - GitHub
It is kept in the create-app template for backwards compatibility. The remove-plugin command has been removed, as it has been removed from the...
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:114243 - "new ebuild for songanalysis-0.4.0" status:RESOLVED resolution:OBSOLETE ... Bug:271330 - "sys-apps/v86d-0.1.9 crash when changing screen on ...
Read more >Change subtitles or languages for videos in the Apple TV app ...
To change the default subtitles language in Settings, go to Settings > Video and Audio > Audio > Subtitle Language, then choose the...
Read more >Manage subtitle settings - Computer - YouTube Help
Captions (subtitles) are available on videos where the owner has added them, and on some videos where YouTube automatically adds them. You can...
Read more >What's New - Oracle Linux Yum Server
tio-2.4-1.el9 - Simple TTY terminal I/O application (Update) ... rust-difflib-0.4.0-3.el9 - Port of Python's difflib library to Rust (New) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to reproduce is a couple of times with this code, hitting ‘q’ shortly after starting the app:
Calling
cancel()
on the task seems to fix the issue.I thought I would be able to reproduce it with this, but that’s not the case:
The exception is raised when I quit the application. I overrode action_quit, which aborts the asyncio tasks. I’ll need to look into that further…