Skip to content

Regular crashes within _styles_cache.py #5796

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

Open
GrizzlyFr opened this issue May 12, 2025 · 4 comments
Open

Regular crashes within _styles_cache.py #5796

GrizzlyFr opened this issue May 12, 2025 · 4 comments

Comments

@GrizzlyFr
Copy link

I use Textual as an interface for running long industrial tests (e.g. two weeks span). At some seemingly random moments, my interface crashes.

It happens always in the same function of _styles_cache.py, for a missing "Y" key error. In my interface, I use a Log widget to display the INFO level logging entries (while all levels including INFO are put in a file). It seems that Textual crashes when writing a log entry to the Log widget.

I can't provide the code as it is linked to a physical test bench. But I did attached the exception trace and a screenshot of my interface.

I have no clue on how to fix it at least temporarily in order to complete my tests. Any suggestions ?

PS : Below the "textual diagnose", the screenshot and the trace:

Versions

Name Value
Textual 3.2.0
Rich 13.9.4

Python

Name Value
Version 3.10.12
Implementation CPython
Compiler GCC 11.4.0
Executable /home/user

/Documents/main_controller/venv/bin/python3 |

Operating System

Name Value
System Linux
Release 5.15.0-138-generic
Version #148-Ubuntu SMP Fri Mar 14 19:05:48 UTC 2025

Terminal

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

Rich Console options

Name Value
size width=238, height=57
legacy_windows False
min_width 1
max_width 238
is_terminal True
encoding utf-8
max_height 57
justify None
overflow None
no_wrap False
highlight None
markup None
height None

Image

textual_crash_trace.txt

@willmcgugan
Copy link
Collaborator

The traceback suggests you aren't running on the latest version. The line numbers don't match what I would expect for the latest version. I'd look into the environment that is running the app. The exception looks familiar. I suspect an upgrade will fix it.

@Textualize Textualize deleted a comment from github-actions bot May 12, 2025
@GrizzlyFr
Copy link
Author

As I understand it, 3.2.0 is the latest version. If not, could you please provide me with a specific version to try?

@willmcgugan
Copy link
Collaborator

3.2.0 is the latest version, but the attached traceback was running an earlier version.

@GrizzlyFr
Copy link
Author

Ok. I am confused as I don't have Textual outside the venv and I don't remember upgrading the package between the traceback generation and the textual diagnose.

Anyway, I launch a new test to be sure. Results in six days...

Thanks Will

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

2 participants