Skip to content

New version of Dask breaks Solara/Vaex compatability #191

Closed

Description

@theeldermillenial

Since you're also one of the members of the vaex team, I thought you might appreciate this :)

I'm using vaex with solara. When I import vaex in my script and try to deploy my solara app in fastapi, I get an error regarding FakeIPython (stack trace at the bottom).

I think this is a problem with solara, because importing either vaex or the the offending dask submodules does not result in the same error.

This issue only seems to be present in the latest version of dask, dask==2023.6.1, which was release within the last several days. If I roll back to dask==2023.6.0, my application runs fine.

Based on my understanding of the stack trace, it looks like this is a problem with the way solara is autorouting modules.

Also, I said before I really like the Solara project. I am obviously a fan of vaex as well :)

  File "router.py", line 5, in <module>
    import solara.server.fastapi
  File ".venv\lib\site-packages\solara\server\fastapi.py", line 3, in <module>
    from . import starlette
  File ".venv\lib\site-packages\solara\server\starlette.py", line 48, in <module>
    from . import app as appmod
  File ".venv\lib\site-packages\solara\server\app.py", line 537, in <module>
    apps["__default__"] = AppScript(os.environ.get("SOLARA_APP", "solara.website.pages:Page"))
  File ".venv\lib\site-packages\solara\server\app.py", line 79, in __init__
    app = self._execute()
  File ".venv\lib\site-packages\solara\server\app.py", line 114, in _execute
    routes = [solara.autorouting._generate_route_path(self.path, first=True)]
  File ".venv\lib\site-packages\solara\autorouting.py", line 488, in _generate_route_path
    module = source_to_module(subpath)
  File ".venv\lib\site-packages\solara\autorouting.py", line 36, in source_to_module
    exec(ast, mod.__dict__)
  File "ui\index.py", line 4, in <module>
    import minswap.pools
  File ".venv\lib\site-packages\minswap\pools.py", line 11, in <module>
    from minswap import addr
  File ".venv\lib\site-packages\minswap\addr.py", line 22, in <module>
    import vaex
  File ".venv\lib\site-packages\vaex\__init__.py", line 41, in <module>
    import vaex.logging
  File ".venv\lib\site-packages\vaex\logging.py", line 7, in <module>
    import vaex.settings
  File ".venv\lib\site-packages\vaex\settings.py", line 3, in <module>
    import vaex.utils
  File "venv\lib\site-packages\vaex\utils.py", line 23, in <module>
    import dask.utils
  File ".venv\lib\site-packages\dask\__init__.py", line 5, in <module>
    from dask.base import (
  File ".venv\lib\site-packages\dask\base.py", line 93, in <module>
    ip.set_custom_exc((Exception,), _clean_ipython_traceback)
AttributeError: 'FakeIPython' object has no attribute 'set_custom_exc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions