← 输入框|github.com|刷新
Skip to content

Feast ui cannot parse url path #3765

Closed

Description

@snowron

Expected Behavior

One of example cases:
When user navigate localhost:8888/p/order_count_project/feature-view/user_3_and_7_days_order_count should see related feature-view page

Current Behavior

One of example cases:
When user navigate localhost:8888/p/order_count_project/feature-view/user_3_and_7_days_order_count see "Internal Server Error"

Steps to reproduce

install feast 0.34.1
run feast ui
navigate homepage localhost:8888
navigate any page (entities or feature-view or data sources doesn't matter)
you will see the page you clicked at browser search bar like http://localhost:8888/p/order_count_project/data-source
then refresh or copy url open in new tab
you will see internal server error

Specifications

  • Version: 0.34.1
  • Platform: macos
  • Subsystem:

Possible Solution

ui_server.py file updated recently. commit changes resource finder library and then it returns PosixPath.
We should convert to str and add little "/" to "@app.api_route("/p/{path_name:path}", methods=["GET"])" function

Activity

  1. alexander-pv commented on Sep 21, 2023

    @alexander-pv

    Faced the same problem.

    Everything works fine until you refresh a page.
    Any page reload triggers the same python error (PosixPath and string concat) which results in Internal Server Error.

    Error:
    Traceback (most recent call last):
      File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
        result = await app(  # type: ignore[func-returns-value]
      File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
        return await self.app(scope, receive, send)
      File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 290, in __call__
        await super().__call__(scope, receive, send)
      File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
        await self.middleware_stack(scope, receive, send)
      File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
        raise exc
      File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
        await self.app(scope, receive, _send)
      File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 83, in __call__
        await self.app(scope, receive, send)
      File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
        raise exc
      File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
        await self.app(scope, receive, sender)
      File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
        raise e
      File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
        await self.app(scope, receive, send)
      File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
        await route.handle(scope, receive, send)
      File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
        await self.app(scope, receive, send)
      File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
        response = await func(request)
      File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 241, in app
        raw_response = await run_endpoint_function(
      File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 169, in run_endpoint_function
        return await run_in_threadpool(dependant.call, **values)
      File "/usr/local/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
        return await anyio.to_thread.run_sync(func, *args)
      File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
        return await get_async_backend().run_sync_in_worker_thread(
      File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2106, in run_sync_in_worker_thread
        return await future
      File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 833, in run
        result = context.run(func, *args)
      File "/usr/local/lib/python3.10/site-packages/feast/ui_server.py", line 80, in catch_all
        filename = ui_dir + "index.html"
    TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions