Trame-Flow : Demo examples

Hello,

Got onto vue-flow and exploring trame-flow, this example python .\examples\serialization.py is rendering as below ..

python .\examples\style.py

test.py also throws some error

(.venv) PS C:\Users\user\trame-flow> python .\examples\test.py
Traceback (most recent call last):
File “C:\Users\user\trame-flow\examples\test.py”, line 25, in
with vuetify.VContainer(fluid=True, classes=“pa-4”):
^^^^^^^^^^^^^^^^^^
AttributeError: module ‘trame_vuetify’ has no attribute ‘VContainer’
(.venv) PS C:\Users\user\trame-flow> python .\examples\test.py
No server available for element v-btn
v-btn.state is missing
Traceback (most recent call last):
File “C:\Users\user\trame-flow\examples\test.py”, line 8, in
vuetify.VBtn(“Primary”, color=“primary”),
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\trame-flow.venv\Lib\site-packages\trame_vuetify\widgets\vuetify.py”, line 1678, in init
super().init(“v-btn”, children, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\trame-flow.venv\Lib\site-packages\trame_vuetify\widgets\vuetify.py”, line 12, in init
super().init(_elem_name, children, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\trame-flow.venv\Lib\site-packages\trame_client\widgets\core.py”, line 435, in init
super().init(self._server, ctx_name=ctx_name)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\user\trame-flow.venv\Lib\site-packages\trame_common\obj\component.py”, line 34, in init
self._bind_annotated_methods()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File “C:\Users\user\trame-flow.venv\Lib\site-packages\trame_common\obj\component.py”, line 62, in _bind_annotated_methods
s_translator = self.state.translator
^^^^^^^^^^^^^^^^^^^^^
AttributeError: ‘NoneType’ object has no attribute ‘translator’

Can you provide png’s of how each example will finally render ?

Hi,

The serialization and the style examples should look like this:

It seems that you didn’t build the vue component before installing the trame-flow python module. You can do it with:

    cd vue-components
    npm i
    npm run build

I’ve followed the steps ..


anything else that seems not trivial ..

There might be an issue with the css filename. Try to rename ./src/trame_flow/module/serve/trame_flow.css to ./src/trame_flow/module/serve/style.css and see if it works. I need to investigate this.

Yes renaming solved the issue ..Thanks for your support.

sometimes this would occur in vue-flow too when the “style.css” is not called from “app.vue”

Great! Could you open an issue on GitHub - Kitware/trame-flow · GitHub about this bug, please ? Don’t hesitate to include information to reproduce the issue, like your node and npm versions.

Sure .. what is the preferred channel .. will follow that to avoid redundant queries..

For trame issues related to ParaView, you can ask here. For other questions or issues, you can open issues or discussions on GitHub - Kitware/trame: Trame lets you weave various components and technologies into a Web Application solely written in Python. · GitHub or on a specific module repository (like GitHub - Kitware/trame-flow · GitHub).