Skip to content
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

"solara create portal solara-test-portal" not working out-of-the box #135

Open
rd-andreas-lay opened this issue Jun 2, 2023 · 4 comments

Comments

@rd-andreas-lay
Copy link

rd-andreas-lay commented Jun 2, 2023

Just following the "As a package" section from https://solara.dev/docs/howto/multipage I ran into a few issues which are related to the working directory:

  • The relative imports don't work: ImportError: attempted relative import with no known parent package
  • Changing all imports to absolute imports (import solara_test_portal...) didn't not work immediately either
  • export PYTHONPATH=PATH/TO/solara-test-portal finally fixed the imports

Another unrelated problem I ran into:

  • Problems with VAEX on the subpages: ImportError: PyO3 modules may only be initialized once per interpreter process
  • Not sure what causes the issue, I currently cannot reproduce it.

Also the app needs to be run with solara run solara_test_portal.pages instead of solara run solara_test_portal as stated in the docs. However the command line output is correct, I just guess the documentation is out-of-date here.

I ran the example with Python 3.9.

@maartenbreddels
Copy link
Contributor

Hi Andreas,

Thank you for reporting!
Did you do the pip install command? The relative import should not be a problem using solara run solara_test_portal.pages
The run command was fixed in #111, but I just merged this, so it's not on the documentation site yet.
I think it's best we remove the vaex dependency from this example, although I also don't know why you saw that issue.

Regards,

Maarten

@layandreas
Copy link

Hi Maarten,

my mistake, I intuitively used the project folder as the working directory.

I still had to load Vaex as requirements manually though. And Vaex seems to break the hot reloading feature, that's not optimal for "playing around" (PyO3 modules may only be initialized once per interpreter process).

On an off note: Nice work! It's definitely fun to use and has potential!

@koenvo
Copy link
Contributor

koenvo commented Dec 14, 2023

I'm experiencing the ImportError: PyO3 modules may only be initialized once per interpreter process as well. The hot-reload in combination with pydantic causes this issue in my case.

@maartenbreddels
Copy link
Contributor

@koenvo are you on an older version of solara?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants