ZandevOxford / zandev_textual_widgets

Custom widgets for Textual
MIT License
6 stars 1 forks source link

test app won't launch #1

Open edward-jazzhands opened 2 days ago

edward-jazzhands commented 2 days ago

Hey I tried launching the test app, but it won't work for me. I tried it on both linux (WSL2) and windows, and got the exact same error message. So I have a feeling its an issue with the app.

Here is the error:

File "C:\Users\brent\programming\textual-sandbox\zandev_test\zandev_test.py", line 298, in class TestApp(App): File "C:\Users\brent\programming\myenv1\Lib\site-packages\textual\message_pump.py", line 109, in new class_obj = super().new(cls, name, bases, class_dict, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\brent\programming\myenv1\Lib\site-packages\textual\app.py", line 790, in __init_subclass__ raise ValueError( ValueError: SCREENS should contain a Screen type or callable, not an instance (got instance of Main for 'main')

ZandevOxford commented 2 days ago

Thanks. I’m hopefully going to get to releasing a new version soon and I’ll catch up with the changes in Textual.

On Sun, 20 Oct 2024 at 14:09, Edward Jazzhands @.***> wrote:

Hey I tried launching the test app, but it won't work for me. I tried it on both linux (WSL2) and windows, and got the exact same error message. So I have a feeling its an issue with the app.

Here is the error:

File "C:\Users\brent\programming\textual-sandbox\zandev_test\zandev_test.py", line 298, in class TestApp(App): File "C:\Users\brent\programming\myenv1\Lib\site-packages\textual\message_pump.py", line 109, in new class_obj = super().new(cls, name, bases, class_dict, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\brent\programming\myenv1\Lib\site-packages\textual\app.py", line 790, in init_subclass* raise ValueError( ValueError: SCREENS should contain a Screen type or callable, not an instance (got instance of Main for 'main')

— Reply to this email directly, view it on GitHub https://github.com/ZandevOxford/zandev_textual_widgets/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHCV4OUKXHNMBNIVLQZ5BPTZ4OTPPAVCNFSM6AAAAABQIQE4LCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYDANBUGY4TCNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

NamanVer02 commented 2 days ago

Hey @ZandevOxford I went through your code and fixed the current issue, but there is another error now, possibly with the menu.py and how things are mounted. I added the error in the pull request.

ZandevOxford commented 2 days ago

Thanks, looks like textual has changed behaviour since I wrote that (the test app did run cleanly with older versions).

I'll have a look at the further errors.

ZandevOxford commented 2 days ago

Sadly it looks like Textual has significantly changed since 0.53, so various of the things I did here don't currently work, and this is likely to need a more substantial rewrite.

ZandevOxford commented 2 days ago

OK, so the current head is at least roughly working again with the latest Textual. Though I've spotted a number of glitches still so will need some more tuning.