Solara

S

Solara

Join the community to ask questions about Solara and get answers from other members.

Join

questions-issues

general

announcements

ipyaggrid memory leak

Hi, I have an app that uses a few sizeable ipyaggrid grids (one per tab) that are leading to memory leaks (when I replace them with solara.Dataframe's for example, then there is no leak). I am using a AgGrid component with a cleanup function, along the lines below, and it seems to be improving things but wanted to know if there is a better approach, on either python and JS side (using js_post_grid) ? ``` import ipyaggrid...

Extract the value from an ipywidget

Hi all! I want to extract the value from an ipywidget but the values between the Solara app and the ipywidget do not coincide (I need to keep pressing the slider for a long time before they both agree). Here is the code I have: ```python import solara import ipywidgets as widgets ...

Quarto Solara compatibility

I'm writing a tutorial to build LLM chat apps with Solara: https://alonsosilvaallende.github.io/blog/posts/2024-04-11-Build_a_basic_LLM_chat_app_with_Solara.html In my blog, I use Quarto, however there is some compatibility which might be simple or difficult to solve (I don't know). I expect the cells output of jupyter notebooks to appear directly in Quarto (see for example the first two cells in this blog entry): https://alonsosilvaallende.github.io/blog/posts/2024-04-18-Quarto-Solara-Test.html However, the cells of Solara components don't appear directly in Quarto (see for example the third cell): https://alonsosilvaallende.github.io/blog/posts/2024-04-18-Quarto-Solara-Test.html...

PermissionError for nbextensions on startup with v1.29+

hi all, i've been trying out solara for the past month or so. i was using v1.28 with no issues. today i tried upgrading and i've been having trouble getting things running on any higher version. i know that there were significant changes to the packaging starting with v1.31, but at this point i can't even upgrade to v1.29. i'm getting a PermissionError on startup: ```...

Image Select

Hi all. Can you help me. I'm trying to make an image selector, like the one made here by https://github.com/jrieke/streamlit-image-select for streamlit. I tried to do this using ToggleButtonsSingle, it worked for me, but all the buttons with pictures end up in one line, and I can have a lot of pictures, I tried to add GridFixed, but now everything crashes because it can’t find the value correctly.

Remove the "Powered by Solara" Tag for production deployment?

Hey all! Knew to Solara and loving the package so far! I'm curious if it is possible to remove the "Powered by Solara" tag that appears in the bottom right corner of the app? Potentially looking to deploy solara apps for clients in their environments where it would be innapropriate to habe this tag. Thanks!...

Google Analytics?

Hello. Has anyone figured out how to inject a google analytics tag into the html <head>? Is this even possible with Solara? Are there any other website analytics for Solara?

Help with running solara

Hello! I am new to solara. I started using solara a couple weeks ago and it was running fine. I use "py -m solara run <filename>/.py" to run my web app on powershell. But tuday i encounter a problem when trying to run it....
No description

Citing solara

Hello! This may be a bit of an odd request, but I'm interested in citing solara. Some popular python packages, such as networkx and mesa provide BibTex citations for the packages. Is anything like this available for solara?

Embedding Solara / iframe / parameter

I would like to integrate Solara to the exiting application using iframe with passing arguments.
<iframe src="http://localhost:8765/?data=test" width="100%" height="100%"></iframe> How can I read arguments in Solara application? ...

Full Screen Output

I am getting an error whenever I click on the full screen button and it also occurs in the documentation, as an example. with the error --- ''' The above exception was the direct cause of the following exception: ...

Setting height of `ipyaggrid` in Solara app gives error

Hi, how can I set the height of a ipyaggrid that is being cross-filtered by a solara component? I am using @MaartenBreddels 's snippet here https://discord.com/channels/1106593685241614489/1106593686223069309/1212429587867504730. However, if I pass an integer height to the grid element like this ipyaggrid.Grid.element(..., height=500) it renders fine but then leads to this error: trait of a Grid instance expected a unicode string, not the int 500, whenever the data is filtered. Could it be a bug in ipyaggrid where the widget expects height to be an int but the trait is defined as unicode, leading to data type issues? I found a workaround but wonder if I am missing something or if there is a better approach. Thanks! ``` from typing import cast import ipyaggrid...

Streaming partial extraction

I want to replicate this streaming partial extraction: https://x.com/jxnlco/status/1755723172228350056 The basic idea is to use an LLM to extract some particular information (for example, name, e-mail and twitter login) from a text. I think I'm able to do it inside the solara chatbot example. That is, I send a message (which will not be displayed) just to activate the extraction and then I will stream the response within the solara.lab.ChatBox. I don't like this solution because ideally I would like to activate the extraction with a button, not with solara.lab.ChatInput. Any hint about how to accomplish this?...

OAuth example fails

https://solara.dev/documentation/examples/general/login_oauth clicking the button results in an error page with Callback URL mismatch.

Switching Tabs resets a state when lazy loading is set to True

I want to keep local state of components when switching Tabs but also I need lazy=True since I don't want inactive tabs to be rendered. Unfortunately, it seems to be impossible to have both. With lazy=True the local state of the components resets to default values, in the attached example I used solara.use_state, but the same holds true for solara.use_reactive. Is there a way to keep local state of the component when switching Tabs and having lazy loading too?...

Running a file vs running a module

Hello! I am trying to get solara up and running for use with mesa but am having some issues. I structured my code as a python package and would like to be able to run solara run my-package (or even better, just my-package) in the cli to start the server. Currently, running solara run __main__.py works, but for some reason running solara run my-package does not. Adding a print statement to __main__.py, I can see it being printed but solara does not appear to be able to find the route:
Page not found by Solara router
Page not found by Solara router
...

Multiple different solara apps under Fastapi endpoints?

Hi, I can follow the explanation from the docs to integrate one solara app into an existing FastAPI application https://solara.dev/docs/deploying/self-hosted ``` from fastapi import FastAPI...

Using existing plotly widget to update figures

With go.FigureWidget it is possible to update the data/properties of a figure without redrawing it. E.g. I can create a scatter plot with a lot of points: ``` N = 1000000 fig = go.FigureWidget(...

Multipage tab color

Is there a way to set the color of the page-tab text in a multipage application? I'm interested in setting the tab text color for both the selected and unselected states. I have tried various tests using style in the AppLayout component but had no luck.

Is there a way to filter the options in a select element

I want to use a select element but I have a rather big amount of options in my list, so I was wondering if it is possible to add a filter to the select element. I already tried the CrossFilterSelect element, but i need the style to be like the select element (without the element count percentage and "x of n").