Textualize / textual-serve

Serve Textual apps locally
MIT License
186 stars 8 forks source link

textual-serve is not starting #21

Closed BenniWi closed 2 months ago

BenniWi commented 2 months ago

Hi everyone,

I'm quite new to textual and still try to figure out some stuff. (I really like it so far). Somehow textual serve is not working for me.

Running python -m textual works totally fine as expected.

Running

from textual_serve.server import Server

server = Server("python -m textual")
server.serve(debug=True)

just creates a website which looks like this

image

I'm having these versions installed:

textual                 0.79.1
textual-dev             1.5.1
textual-serve           1.0.2

and I'm using python 3.12.3.

Am I doing something wrong?

willmcgugan commented 2 months ago

Textual serve is at 1.1.1. If you update, it should work.

How did you install? I would have expected you get the latest automatically.

BenniWi commented 2 months ago

Hi, thanks a lot for the fast reply. I actually had 1.1.1 installed and it didn't work either. I then checked the latest tags on GitHub and installed the versions from the tags.

re-installing latest versions

textual                 0.79.1
textual-dev             1.6.1
textual-serve           1.1.1

still the same result on port 8000 ➡️ tested another port and it works. Unfortunately still the same problem with the calculator demo and my own application. Any hints where I could look for the error (seems to be an issue on my machine!?)

willmcgugan commented 2 months ago

If it is not working on port 8000, it suggests some other process is listening on that port.

If you run with DEBUG=1 it will give more information.

The calculator example is known not to work with textual serve, as it uses inline mode. We will have a fix for that soon.

BenniWi commented 2 months ago

So you just solved the problem 👍

I used the calculator example as basis for my own application. I didn't think about the "inline" option and also used that.

Now everything works fine 🥳 .

(Maybe a short notice about that would make sense? Maybe I just didn't see it?)

Thanks a lot for the immediate help.