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

Blank display on AIX #4156

Closed
jose1711 opened this issue Feb 14, 2024 · 10 comments
Closed

Blank display on AIX #4156

jose1711 opened this issue Feb 14, 2024 · 10 comments

Comments

@jose1711
Copy link
Contributor

A minimalistic example script on AIX does not render any widget - only shows black screen.

code:

#!/usr/bin/env python3
from textual.app import App
from textual.widgets import Button

class MyApp(App):
  BINDINGS = [
          ('q,ctrl+q', 'exit_app', 'Quit'),
          ]

  def compose(self):
    yield Button('FooButton')

  def action_exit_app(self):
    self.app.exit()

if __name__ == "__main__":
  app = MyApp()
  app.run()

No button is displayed but the application does react on keypress: q quits the application but a reset command is required to restore the terminal cursor.

Additional information:

AIX 7200-05-05-2246
Python 3.9.18 (main, Sep 19 2023, 04:57:07) [GCC 10.3.0] on aix
rich              13.7.0
textual           0.50.1

Tested with MobaXTerm and PuTTY.

@davep
Copy link
Contributor

davep commented Feb 14, 2024

To the best of my knowledge, no maintainer has access to a system running AIX; this might be tricky to address.

@Textualize Textualize deleted a comment from github-actions bot Feb 14, 2024
@willmcgugan
Copy link
Collaborator

Have you been able to run other non-Textual TUIs with the same configuration?

The following may generate some useful information:

TEXTUAL_LOG=textual.log python myapp.py

@jose1711
Copy link
Contributor Author

---
driver=<class 'textual.drivers.linux_driver.LinuxDriver'>
loop=<_UnixSelectorEventLoop running=True closed=False debug=False>
features=frozenset()
Writing logs to '/home/MYUSER/demo/textual.log'
Load() >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=None
Compose() >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=<App.on_compose>
Compose() >>> Screen(id='_default') method=<Widget.on_compose>
Compose() >>> Button() method=<Widget.on_compose>
Mount() >>> Button() method=<Widget.on_mount>
Compose() >>> ToastRack(id='textual-toastrack') method=<Widget.on_compose>
Mount() >>> ToastRack(id='textual-toastrack') method=<Widget.on_mount>
Compose() >>> Tooltip(id='textual-tooltip') method=<Widget.on_compose>
Mount() >>> Tooltip(id='textual-tooltip') method=<Widget.on_mount>
Mount() >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=None
ready in 35 milliseconds
Resize(size=Size(width=121, height=62), virtual_size=Size(width=121, height=62)) >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=<App.on_resize>
Mount() >>> Screen(id='_default') method=<Widget.on_mount>
ScreenResume() >>> Screen(id='_default') method=<Screen.on_screen_resume>
Button() was focused
Resize(size=Size(width=121, height=62), virtual_size=Size(width=121, height=62)) >>> Screen(id='_default') method=<Screen.on_resize>
Update(Tooltip(id='textual-tooltip')) >>> Screen(id='_default') method=<Screen.on_update>
Update(ToastRack(id='textual-toastrack')) >>> Screen(id='_default') method=<Screen.on_update>
Update(Button()) >>> Screen(id='_default') method=<Screen.on_update>
Resize(size=Size(width=121, height=62), virtual_size=Size(width=121, height=62)) >>> Screen(id='_default') method=<Screen.on_resize>
Show() >>> Screen(id='_default') method=None
InvokeLater(callback=functools.partial(<function Screen.set_focus.<locals>.scroll_to_center at 0xa00000000c679d0>, Button())) >>> Screen(id='_default') method=<MessagePump.on_invoke_later>
Resize(size=Size(width=16, height=3), virtual_size=Size(width=16, height=3), container_size=Size(width=16, height=1)) >>> Button() method=None
Show() >>> Button() method=None
Focus() >>> Button() method=<Widget.on_focus>
Ready() >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=None
Update(Button()) >>> Screen(id='_default') method=<Screen.on_update>
Layout() >>> Screen(id='_default') method=<Screen.on_layout>
DescendantFocus(widget=Button()) >>> Screen(id='_default') method=None
Update(Button()) >>> Screen(id='_default') method=<Screen.on_update>
DescendantFocus(widget=Button()) >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=None
Key(key='q', character='q', name='q', is_printable=True) >>> Button() method=<Widget.on_key>
Key(key='q', character='q', name='q', is_printable=True) >>> Screen(id='_default') method=<Widget.on_key>
Key(key='q', character='q', name='q', is_printable=True) >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=<App.on_key>
<action> namespace=MyApp(title='MyApp', classes={'-dark-mode'}) action_name='exit_app' params=()
ExitApp() >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=<App.on_exit_app>
Unmount() >>> Button() method=<Widget.on_unmount>
Unmount() >>> ToastRack(id='textual-toastrack') method=<Widget.on_unmount>
Unmount() >>> Tooltip(id='textual-tooltip') method=<Widget.on_unmount>
focus was removed
Unmount() >>> Screen(id='_default') method=<Widget.on_unmount>
Unmount() >>> MyApp(title='MyApp', classes={'-dark-mode'}) method=None

@jose1711
Copy link
Contributor Author

Have you been able to run other non-Textual TUIs with the same configuration?

midnight commander (version 4.8.26) is running fine.

$ ldd `which mc`
/opt/freeware/bin/mc needs:
         /usr/lib/libc.a(shr_64.o)
         /usr/lib/libpthreads.a(shr_xpg5_64.o)
         /opt/freeware/lib64/libmc.a(libmc-1.so.0)
         /opt/freeware/lib64/libintl.a(libintl.so.8)
         /opt/freeware/lib64/libglib-2.0.a(libglib-2.0.so.0)
         /opt/freeware/lib64/libslang.a(libslang.so)
         /opt/freeware/lib64/libgmodule-2.0.a(libgmodule-2.0.so.0)
         /unix
         /usr/lib/libcrypt.a(shr_64.o)
         /opt/freeware/lib64/libgcc_s.a(shr.o)
         /opt/freeware/lib/libiconv.a(libiconv.so.2)
         /opt/freeware/lib/libpcre2-8.a(libpcre2-8.so.0)
         /usr/lib/libdl.a(shr_64.o)

@jose1711
Copy link
Contributor Author

Output of textual diagnose:

Textual Diagnostics

Versions

Name Value
Textual 0.50.1
Rich 13.7.0

Python

Name Value
Version 3.9.18
Implementation CPython
Compiler GCC 10.3.0
Executable /home/MYUSER/textual/bin/python3

Operating System

Name Value
System AIX
Release 2
Version 7

Terminal

Name Value
Terminal Application Unknown
TERM xterm-256color
COLORTERM Not set
FORCE_COLOR Not set
NO_COLOR Not set

Rich Console options

Name Value
size width=121, height=62
legacy_windows False
min_width 1
max_width 121
is_terminal True
encoding iso8859-1
max_height 62
justify None
overflow None
no_wrap False
highlight None
markup None
height None

@TomJGooding
Copy link
Contributor

This is a bit of a long shot, but perhaps try changing your encoding (e.g. UTF-8) and see if that makes any difference?

@jose1711
Copy link
Contributor Author

@TomJGooding

Thank you, that did it! For reference:

smitty mle_add_lang
CULTURAL convention to install -> 'UTF-8      English (United States) [EN_US]
export LANG=EN_US.UTF-8
python3 -m textual

Seems to be working nice.
image

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

@darrenburns
Copy link
Member

Wow, nice one @TomJGooding 👏

@willmcgugan
Copy link
Collaborator

This is a bit of a long shot, but perhaps try changing your encoding (e.g. UTF-8) and see if that makes any difference?

He shoots. He scores!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants