Giter VIP home page Giter VIP logo

Comments (6)

dprotaso avatar dprotaso commented on June 15, 2024 1

So I tried to create a sample app - https://github.com/dprotaso/knative-15074

The error seems specific to the framework/build process. Even running locally with docker the sample fast_api sample websocket app I see in the logs

WARNING: Unsupported upgrade request.
WARNING: No supported WebSocket library detected. Please use "pip install 'uvicorn[standard]'", or install 'websockets' or 'wsproto' manually

Based on your pdm list you don't have those dependencies so I'd expect the same error.

Do you have an existing app container/sample app built that works on 1.12 but not 1.13? I'm wondering if something in your base image changed (was removed) and maybe you didn't notice?

I'm thinking this isn't specific to Knative.

/triage needs-user-input

from serving.

dicolasi avatar dicolasi commented on June 15, 2024 1

The error was with fastapi. Anyone having the same problem, just install hypercorn as described here tiangolo/fastapi#2907.

Thanks @dprotaso for the support.

from serving.

dprotaso avatar dprotaso commented on June 15, 2024

Can you link an example repository with source and how you build your container image? Otherwise it's not clear what version of python and the various dependencies you are using.

from serving.

dicolasi avatar dicolasi commented on June 15, 2024

I use pdm, here the relative dependencies:

[project]
dependencies = [
    "fastapi>=0.104.1",
    "fastapi-healthchecks>=1.1.0",
]
requires-python = ">=3.11"

from serving.

dicolasi avatar dicolasi commented on June 15, 2024

I removed too much from my initial pdm. Here the complete list of dependencies:

dependencies = [ "fastapi>=0.104.1", "fastapi-cache2[redis]>=0.2.1", "uvicorn[standard]>=0.23.2", "httpx>=0.25.1", "Jinja2>=3.1.2", "pytailwindcss>=0.2.0", "pydash>=7.0.6", "jinja2-fragments>=1.2.1", "python-multipart>=0.0.6", "ruff>=0.1.3", "pydantic-settings>=2.0.3", "requests>=2.31.0", "jsonpath-ng>=1.6.0", "psycopg2-binary>=2.9.9", "gql>=3.4.1", "requests-toolbelt>=1.0.0", "python-slugify>=8.0.1", "javascript>=1!1.1.3", "pyprojroot>=0.3.0", "python-dotenv>=1.0.0", "aiohttp>=3.8.6", "asyncpg>=0.28.0", "pytest-mock>=3.12.0", "hyx>=0.0.2", "googlemaps>=4.10.0", "pytest>=7.4.3", "pytest-asyncio>=0.21.1", "pytest-freezegun>=0.4.2", "pytest-md>=0.2.0", "pytest-emoji>=0.2.0", "natsort>=8.4.0", "pytest-playwright>=0.4.3", "pytest-xdist>=3.5.0", "playwright>=1.40.0", "pint>=0.22", "fastapi-healthchecks>=1.1.0", "selenium>=4.18.1", "selenium-wire>=5.1.0",

you can see that uvicorn is there, but the error still persist.

from serving.

dprotaso avatar dprotaso commented on June 15, 2024

Hey for us to debug this can you provide a sample repo & docker image? Or feel free to make a PR to the sample one I made.

We're not experts in python/fast_api so that will help speeding up the debugging.

from serving.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.