textual icon indicating copy to clipboard operation
textual copied to clipboard

Issue running Textual based Theengs Explorer on macOS 10.15.7 Catalina

Open DigiH opened this issue 2 years ago • 3 comments

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

DigiH avatar Jun 30 '22 14:06 DigiH

To add to this: this is using Textual 0.1.18, and the code works fine on Ubuntu 20.04.

koenvervloesem avatar Jun 30 '22 14:06 koenvervloesem

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 ;)

DigiH avatar Aug 06 '22 20:08 DigiH

Apparently Windows has the same behavior as macOS.

koenvervloesem avatar Aug 07 '22 18:08 koenvervloesem

https://github.com/Textualize/textual/wiki/Sorry-we-closed-your-issue

willmcgugan avatar Oct 25 '22 09:10 willmcgugan

Did we solve your problem?

Glad we could help!

github-actions[bot] avatar Oct 25 '22 09:10 github-actions[bot]

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.

DigiH avatar Oct 25 '22 11:10 DigiH

I think you want to contact the developer of TheengsDecoder. This looks more like a logic error than an issue with Textual per se.

willmcgugan avatar Oct 25 '22 12:10 willmcgugan

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.

DigiH avatar Oct 25 '22 12:10 DigiH