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
Reload + Polars not working #177
Comments
Hi Lundez, thanks for opening the issue. This is related to #148 Thank you, Maarten |
@maartenbreddels if I add reload_modules = {
k for k in set(sys.modules) - set(self.ignore_modules) if not (k.startswith("solara.server") or k.startswith("anyio") or k.startswith("pandas") or k.startswith("polars"))
} it works! |
Just to keep things both trackable (GitHub) and in more private discussions (Discord) I share our discussion here. Lundez
Marten
|
* fix: autorouting should pick up modules that only define routes Instead of having a Page component, we should also just allow a user to define a set of routes. This is what we need for the /apps/scrolling example. * fix: hot reload was too aggresive (#179) * test: enable reload tests * fix: do not reload modules that are not under the app directory Fixes #177 Fixes #148 * clean up code * __file__ can be None * call clear from the test code * move to subdir so we do not reload the test modules * also catch AttributeError when app is None during unitesting * fix: solara patches should have no effect outside a solara context * pass cls * fix: ignore typing * pass cls * fix: ignore typing --------- Co-authored-by: Maarten A. Breddels <maartenbreddels@gmail.com>
Hi!
Polars (DataFrame) is built using Rust-bindings and this doesn't seem to work with Solara "Auto-Reload" function.
After first reload I get
NameError: name 'PyDataFrame' is not defined
, I believe because it's not reloading the imports correctly.Because Polars uses rust it's using PyO3 to bind into Rust.
It's hard to debug as I don't understand Solara in-depth yet.
This works in streamlit.
How to reproduce:
Change a line and try to load a CSV again and it'll fail.. :/
Works on first try after starting server
Additionally I get a warning
Warning: polars binary missing!
which seems to suggest Rust bindings failing.The text was updated successfully, but these errors were encountered: