Closed dmunozv04 closed 1 month ago
It looks like this isn't just an issue with the SelectionList
, but other widgets too with a notify_style_update
method where their caches haven't yet been initialised.
Should the super()
call be moved to last...?
from textual.app import App, ComposeResult
from textual.widgets import DataTable
class ExampleApp(App):
def compose(self) -> ComposeResult:
yield DataTable(
disabled=True,
)
if __name__ == "__main__":
app = ExampleApp()
app.run()
from textual.app import App, ComposeResult
from textual.widgets import RichLog
class ExampleApp(App):
def compose(self) -> ComposeResult:
yield RichLog(
disabled=True,
)
if __name__ == "__main__":
app = ExampleApp()
app.run()
Don't forget to star the repository!
Follow @textualizeio for Textual updates.
Thanks for fixing it @willmcgugan !
Have you checked closed issues? https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed Yes
Please give a brief but clear explanation of the issue. If you can, include a complete working example that demonstrates the bug.
Attempting to instance a SelectionList with the argument
disabled=True
will crash Textual. This change seems to have been introduced in v0.71 since I'm unable to replicate it on v0.70 or previous versions. I've attached the full crash log as well as a minimal python script that replicates the issue described.error.txt
Please do let me know if you need anything else from me
It will be helpful if you run the following command and paste the results:
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
If you don't have the
textual
command on your path, you may have forgotten to install thetextual-dev
package.Feel free to add screenshots and / or videos. These can be very helpful!