textual
textual copied to clipboard
Issue running Textual based Theengs Explorer on macOS 10.15.7 Catalina
Hi all,
being all new to Textual, but very excited to try out the new Theengs Explorer I'm only ever getting constant loops of
Task exception was never retrieved
future: <Task finished name='Task-1458' coro=<TheengsExplorerApp.detection_callback() done, defined at __init__.py:36> exception=LookupError(<ContextVar name='active_app' at 0x113b61130>)>
Traceback (most recent call last):
File "__init__.py", line 39, in detection_callback
await self.scroll_view.update(self.device_table.render(), home=False)
File "/Users/me/.pyenv/versions/3.8.5/lib/python3.8/site-packages/textual/widgets/_scroll_view.py", line 89, in update
await self.window.update(renderable)
File "/Users/me/.pyenv/versions/3.8.5/lib/python3.8/site-packages/textual/views/_window_view.py", line 39, in update
layout.add(self.widget)
File "/Users/me/.pyenv/versions/3.8.5/lib/python3.8/site-packages/textual/layouts/vertical.py", line 28, in add
self._max_widget_width = max(widget.app.measure(widget), self._max_widget_width)
File "/Users/me/.pyenv/versions/3.8.5/lib/python3.8/site-packages/textual/message_pump.py", line 59, in app
return active_app.get()
LookupError: <ContextVar name='active_app' at 0x113b61130>
while the Textual examples all work fine for me, and all the required dependencies/extra packages for Theengs Explorer are satisfied - TheengsDecoder doesn't exist as an installable package yet, but must be built
Unless this is an obvious older macOS version issue to you, for which I'd be happy to do some external disk newer macOS testing, any further pointers as to what might cause this would be greatly appreciated.
The creator of TheengsExplorer, @koenvervloesem, is also following this to chip in.
Many thanks
To add to this: this is using Textual 0.1.18, and the code works fine on Ubuntu 20.04.
I found that commenting out
await self.scroll_view.update(self.device_table.render(), home=False)
in __init__.py
makes things run fine, completely eliminating the above mentioned error looping, apart from the fact I have to resize the window for any table updates ;)
Apparently Windows has the same behavior as macOS.
https://github.com/Textualize/textual/wiki/Sorry-we-closed-your-issue
Did we solve your problem?
Glad we could help!
Did we solve your problem?
Nope, unfortunately you didn't, the recent textual update just made it worse ;( as the hack we previously found for a manual updating of the window content by resizing the window is now also broken.
I think you want to contact the developer of TheengsDecoder
. This looks more like a logic error than an issue with Textual per se.
I think you meant Theengs Explorer, and yes, he's already on it and looking forward to hopefully get it nicely running with the latest textual update.