idoavrah / terraform-tui

Terraform textual UI
https://pypi.org/project/tftui/
Apache License 2.0
1.02k stars 31 forks source link

Installation is broken #10

Closed oponomarov-tu closed 1 year ago

oponomarov-tu commented 1 year ago

Hey! First and foremost -- thanks for the amazing tool!

It looks like currently the installation with pip is broken:

Traceback (most recent call last):
  File "/Users/esolidarity/.virtualenvs/default/bin/tftui", line 5, in <module>
    from tftui.__main__ import main
  File "/Users/esolidarity/.virtualenvs/default/lib/python3.10/site-packages/tftui/__main__.py", line 3, in <module>
    from textual.widgets import Header, Footer, Tree, TextLog, LoadingIndicator, ContentSwitcher, Static, Button
  File "/Users/esolidarity/.virtualenvs/default/lib/python3.10/site-packages/textual/widgets/__init__.py", line 94, in __getattr__
    raise ImportError(f"Package 'textual.widgets' has no class '{widget_class}'")
ImportError: Package 'textual.widgets' has no class 'TextLog'

Quick googling revealed this, so installing textual==0.31.0 fixed the issue.

idoavrah commented 1 year ago

This was caused by pipx / workstation installing an upgraded version of textual (0.32.0 and later). Textual moved away from using the TextLog class and changing it to a RichLog class (without backward compatibility). I upgraded to textual 0.32 and fixed the breaking change.

Please upgrade tftui and thanks for the catch :)