bentoml / BentoML

The easiest way to serve AI apps and models - Build Model Inference APIs, Job queues, LLM apps, Multi-model pipelines, and more!
https://bentoml.com
Apache License 2.0
7.15k stars 791 forks source link

bug: Image content type is empty when using Multipart #3804

Closed liyi01827 closed 11 months ago

liyi01827 commented 1 year ago

Describe the bug

The issue is related to: https://bentoml.slack.com/archives/CKRANBHPH/p1682541555153939

I set my svc.api's input as bentoml.io.Multipart @svc.api(input=Multipart(image=Image(), img_type=Text(), bbox=NumpyNdarray()), output=NumpyNdarray()) After I run bentoml serve service.py:svc, I send the request to this service but there is error returned

Traceback (most recent call last): File "/home/ff_li/_nasHome/.venv12/lib/python3.9/site-packages/bentoml/_internal/server/http_app.py", line 311, in api_func input_data = await api.input.from_http_request(request) File "/home/ff_li/_nasHome/.venv12/lib/python3.9/site-packages/bentoml/_internal/io_descriptors/multipart.py", line 274, in from_http_request res[field] = await descriptor.from_http_request(form_values[field]) File "/home/ff_li/_nasHome/.venv12/lib/python3.9/site-packages/bentoml/_internal/io_descriptors/image.py", line 352, in from_http_request raise BadInput( bentoml.exceptions.BadInput: no multipart image file

BentoService error handling API request: no multipart image file (allowed mime types are: image/x-icon, image/x-portable-anymap, image/vnd.adobe.photoshop, image/jpeg, image/sgi, video/mpeg, image/bmp, image/x-tga, image/png, image/xpm, image/x-pcx, image/jp2, image/webp, image/icns, image/xbm, image/gif, image/tiff, application/postscript, image/mpo), got files with content types

I have located that the image's content_type is missing in image.py.

I've also tested that it works if I am not using the Multipart but only sending the Image to the URL.

To reproduce

The api is defined: `@svc.api(input=Multipart(image=Image(), img_type=Text(), bbox=NumpyNdarray()), output=NumpyNdarray()) def predict(image: PILImage, img_type: str, bbox: np.ndarray) -> np.ndarray: transform = build_transform()

assert 'tl' in img_type or 'mic' in img_type, "Image type is not correctly specified"

if 'mic' in img_type:
    image = image.crop(bbox).convert('RGB')
else:
    image = image.convert('RGB')
image = transform(image)
if len(image.shape) == 3:
    image = image.unsqueeze(0)
result = runner.run(image)

return result

The way I send the request is by the following code:

m = MultipartEncoder( fields={ "image": ('abc.png', open("./abc.png", "rb"), 'image/png'), "img_type":('', 'mic'), "bbox": ('', '[0,0,100,100]'), } ) res = requests.post("http://0.0.0.0:3000/predict", data=m, headers={"Content-Type": m.content_type})

Expected behavior

The probabilistic prediction should be returned by the model.

Environment

Environment variable

BENTOML_DEBUG=''
BENTOML_QUIET=''
BENTOML_BUNDLE_LOCAL_BUILD=''
BENTOML_DO_NOT_TRACK=''
BENTOML_CONFIG=''
BENTOML_CONFIG_OPTIONS=''
BENTOML_PORT=''
BENTOML_HOST=''
BENTOML_API_WORKERS=''

System information

bentoml: 1.0.18 python: 3.9.12 platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.35 uid_gid: 1009:2000 conda: 23.3.1 in_conda_env: True

conda_packages
```yaml name: base channels: - conda-forge - defaults dependencies: - _anaconda_depends=2023.03=py39_0 - _ipyw_jlab_nb_ext_conf=0.1.0=py39h06a4308_1 - _libgcc_mutex=0.1=main - _openmp_mutex=5.1=1_gnu - absl-py=1.4.0=pyhd8ed1ab_0 - aiohttp=3.8.1=py39hb9d737c_1 - aiosignal=1.3.1=pyhd8ed1ab_0 - alabaster=0.7.12=pyhd3eb1b0_0 - anaconda=custom=py39_1 - anaconda-client=1.11.1=py39h06a4308_0 - anaconda-navigator=2.4.0=py39h06a4308_0 - anyio=3.5.0=py39h06a4308_0 - appdirs=1.4.4=pyhd3eb1b0_0 - argon2-cffi=21.3.0=pyhd3eb1b0_0 - argon2-cffi-bindings=21.2.0=py39h7f8727e_0 - arrow=1.2.3=py39h06a4308_1 - astroid=2.14.2=py39h06a4308_0 - astropy=5.1=py39h7deecbd_0 - asttokens=2.0.5=pyhd3eb1b0_0 - async-timeout=4.0.2=pyhd8ed1ab_0 - atomicwrites=1.4.0=py_0 - attrs=22.1.0=py39h06a4308_0 - automat=20.2.0=py_0 - autopep8=1.6.0=pyhd3eb1b0_1 - babel=2.11.0=py39h06a4308_0 - backcall=0.2.0=pyhd3eb1b0_0 - backports=1.1=pyhd3eb1b0_0 - backports.functools_lru_cache=1.6.4=pyhd3eb1b0_0 - backports.tempfile=1.0=pyhd3eb1b0_1 - backports.weakref=1.0.post1=py_1 - bcrypt=3.2.0=py39h5eee18b_1 - beautifulsoup4=4.11.1=py39h06a4308_0 - binaryornot=0.4.4=pyhd3eb1b0_1 - black=22.6.0=py39h06a4308_0 - blas=1.0=mkl - bleach=4.1.0=pyhd3eb1b0_0 - blinker=1.5=pyhd8ed1ab_0 - blosc=1.21.3=h6a678d5_0 - bokeh=2.4.3=py39h06a4308_0 - boltons=23.0.0=pyhd8ed1ab_0 - bottleneck=1.3.5=py39h7deecbd_0 - brotli=1.0.9=h5eee18b_7 - brotli-bin=1.0.9=h5eee18b_7 - brotlipy=0.7.0=py39h27cfd23_1003 - brunsli=0.1=h2531618_0 - bzip2=1.0.8=h7b6447c_0 - c-ares=1.19.0=h5eee18b_0 - ca-certificates=2022.12.7=ha878542_0 - cachetools=5.3.0=pyhd8ed1ab_0 - certifi=2022.12.7=pyhd8ed1ab_0 - cffi=1.15.1=py39h74dc2b5_0 - cfitsio=3.470=h5893167_7 - chardet=4.0.0=py39h06a4308_1003 - charls=2.2.0=h2531618_0 - charset-normalizer=2.0.4=pyhd3eb1b0_0 - click=8.0.4=py39h06a4308_0 - cloudpickle=2.0.0=pyhd3eb1b0_0 - clyent=1.2.2=py39h06a4308_1 - colorama=0.4.6=py39h06a4308_0 - colorcet=3.0.1=py39h06a4308_0 - comm=0.1.2=py39h06a4308_0 - conda=23.3.1=py39hf3d152e_0 - conda-build=3.23.3=py39h06a4308_0 - conda-content-trust=0.1.3=py39h06a4308_0 - conda-env=2.6.0=1 - conda-package-handling=2.0.2=py39h06a4308_0 - conda-package-streaming=0.7.0=py39h06a4308_0 - conda-repo-cli=1.0.27=py39h06a4308_0 - conda-token=0.4.0=pyhd3eb1b0_0 - conda-verify=3.4.2=py_1 - constantly=15.1.0=pyh2b92418_0 - contourpy=1.0.5=py39hdb19cb5_0 - cookiecutter=1.7.3=pyhd3eb1b0_0 - cryptography=39.0.1=py39h9ce1e76_0 - cssselect=1.1.0=pyhd3eb1b0_0 - curl=7.88.1=h5eee18b_0 - cycler=0.11.0=pyhd3eb1b0_0 - cytoolz=0.12.0=py39h5eee18b_0 - daal4py=2023.0.2=py39h79cecc1_0 - dal=2023.0.1=hdb19cb5_26647 - dask=2022.2.1=pyhd3eb1b0_0 - dask-core=2022.2.1=pyhd3eb1b0_0 - dataclasses=0.8=pyh6d0b6a4_7 - datashader=0.14.4=py39h06a4308_0 - datashape=0.5.4=py39h06a4308_1 - dbus=1.13.18=hb2f20db_0 - debugpy=1.5.1=py39h295c915_0 - decorator=5.1.1=pyhd3eb1b0_0 - defusedxml=0.7.1=pyhd3eb1b0_0 - diff-match-patch=20200713=pyhd3eb1b0_0 - dill=0.3.6=py39h06a4308_0 - distributed=2022.2.1=pyhd3eb1b0_0 - docstring-to-markdown=0.11=py39h06a4308_0 - docutils=0.18.1=py39h06a4308_3 - entrypoints=0.4=py39h06a4308_0 - et_xmlfile=1.1.0=py39h06a4308_0 - executing=0.8.3=pyhd3eb1b0_0 - expat=2.4.9=h6a678d5_0 - filelock=3.9.0=py39h06a4308_0 - flake8=6.0.0=py39h06a4308_0 - flask=1.1.2=pyhd3eb1b0_0 - flit-core=3.8.0=py39h06a4308_0 - fontconfig=2.14.1=h52c9d5c_1 - fonttools=4.25.0=pyhd3eb1b0_0 - freetype=2.12.1=h4a9f257_0 - frozenlist=1.3.3=py39h5eee18b_0 - fsspec=2022.11.0=py39h06a4308_0 - future=0.18.3=py39h06a4308_0 - gensim=4.3.0=py39h6a678d5_0 - giflib=5.2.1=h5eee18b_3 - glib=2.69.1=h4ff587b_1 - glob2=0.7=pyhd3eb1b0_0 - gmp=6.2.1=h295c915_3 - gmpy2=2.1.2=py39heeb90bb_0 - google-auth=2.17.1=pyh1a96a4e_0 - google-auth-oauthlib=0.4.6=pyhd8ed1ab_0 - greenlet=2.0.1=py39h6a678d5_0 - grpcio=1.42.0=py39hce63b2e_0 - gst-plugins-base=1.14.1=h6a678d5_1 - gstreamer=1.14.1=h5eee18b_1 - h5py=3.7.0=py39h737f45e_0 - hdf5=1.10.6=h3ffc7dd_1 - heapdict=1.0.1=pyhd3eb1b0_0 - holoviews=1.15.4=py39h06a4308_0 - huggingface_hub=0.10.1=py39h06a4308_0 - hvplot=0.8.2=py39h06a4308_0 - hyperlink=21.0.0=pyhd3eb1b0_0 - icu=58.2=he6710b0_3 - idna=3.4=py39h06a4308_0 - imagecodecs=2021.8.26=py39hfcb8610_2 - imageio=2.26.0=py39h06a4308_0 - imagesize=1.4.1=py39h06a4308_0 - imbalanced-learn=0.10.1=py39h06a4308_0 - importlib-metadata=6.0.0=py39h06a4308_0 - importlib_metadata=6.0.0=hd3eb1b0_0 - importlib_resources=5.2.0=pyhd3eb1b0_1 - incremental=21.3.0=pyhd3eb1b0_0 - inflection=0.5.1=py39h06a4308_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - intake=0.6.8=py39h06a4308_0 - intel-openmp=2021.4.0=h06a4308_3561 - intervaltree=3.1.0=pyhd3eb1b0_0 - ipykernel=6.19.2=py39hb070fc8_0 - ipython=8.10.0=py39h06a4308_0 - ipython_genutils=0.2.0=pyhd3eb1b0_1 - ipywidgets=8.0.4=py39h06a4308_0 - isort=5.9.3=pyhd3eb1b0_0 - itemadapter=0.3.0=pyhd3eb1b0_0 - itemloaders=1.0.4=pyhd3eb1b0_1 - itsdangerous=2.0.1=pyhd3eb1b0_0 - jaraco.classes=3.2.1=pyhd3eb1b0_0 - jedi=0.18.1=py39h06a4308_1 - jeepney=0.7.1=pyhd3eb1b0_0 - jellyfish=0.9.0=py39h7f8727e_0 - jinja2=2.11.3=pyhd3eb1b0_0 - jinja2-time=0.2.0=pyhd3eb1b0_3 - jmespath=0.10.0=pyhd3eb1b0_0 - joblib=1.1.1=py39h06a4308_0 - jpeg=9e=h5eee18b_1 - jq=1.6=h27cfd23_1000 - json5=0.9.6=pyhd3eb1b0_0 - jsonpatch=1.32=pyhd8ed1ab_0 - jsonpointer=2.0=py_0 - jsonschema=4.17.3=py39h06a4308_0 - jupyter=1.0.0=py39h06a4308_8 - jupyter_client=7.4.9=py39h06a4308_0 - jupyter_console=6.6.2=py39h06a4308_0 - jupyter_core=5.2.0=py39h06a4308_0 - jupyter_server=1.23.4=py39h06a4308_0 - jupyterlab=3.5.3=py39h06a4308_0 - jupyterlab_pygments=0.1.2=py_0 - jupyterlab_server=2.10.3=pyhd3eb1b0_1 - jupyterlab_widgets=3.0.5=py39h06a4308_0 - jxrlib=1.1=h7b6447c_2 - keyring=23.13.1=py39h06a4308_0 - kiwisolver=1.4.4=py39h6a678d5_0 - krb5=1.19.4=h568e23c_0 - lazy-object-proxy=1.6.0=py39h27cfd23_0 - lcms2=2.12=h3be6417_0 - ld_impl_linux-64=2.38=h1181459_1 - lerc=3.0=h295c915_0 - libaec=1.0.4=he6710b0_1 - libarchive=3.6.2=hab531cd_0 - libbrotlicommon=1.0.9=h5eee18b_7 - libbrotlidec=1.0.9=h5eee18b_7 - libbrotlienc=1.0.9=h5eee18b_7 - libclang=10.0.1=default_hb85057a_2 - libcurl=7.88.1=h91b91d3_0 - libdeflate=1.17=h5eee18b_0 - libedit=3.1.20221030=h5eee18b_0 - libev=4.33=h7f8727e_1 - libevent=2.1.12=h8f2d780_0 - libffi=3.3=he6710b0_2 - libgcc-ng=11.2.0=h1234567_1 - libgfortran-ng=11.2.0=h00389a5_1 - libgfortran5=11.2.0=h1234567_1 - libgomp=11.2.0=h1234567_1 - liblief=0.12.3=h6a678d5_0 - libllvm10=10.0.1=hbcb73fb_5 - libllvm11=11.1.0=h9e868ea_6 - libnghttp2=1.46.0=hce63b2e_0 - libpng=1.6.39=h5eee18b_0 - libpq=12.9=h16c4e8d_3 - libprotobuf=3.20.3=he621ea3_0 - libsodium=1.0.18=h7b6447c_0 - libspatialindex=1.9.3=h2531618_0 - libssh2=1.10.0=h8f2d780_0 - libstdcxx-ng=11.2.0=h1234567_1 - libtiff=4.5.0=h6a678d5_2 - libuuid=1.41.5=h5eee18b_0 - libwebp=1.2.4=h11a3e52_1 - libwebp-base=1.2.4=h5eee18b_1 - libxcb=1.15=h7f8727e_0 - libxkbcommon=1.0.1=hfa300c1_0 - libxml2=2.9.14=h74e7548_0 - libxslt=1.1.35=h4e12654_0 - libzopfli=1.0.3=he6710b0_0 - llvmlite=0.39.1=py39he621ea3_0 - locket=1.0.0=py39h06a4308_0 - lxml=4.9.1=py39h1edc446_0 - lz4-c=1.9.4=h6a678d5_0 - lzo=2.10=h7b6447c_2 - markdown=3.4.1=py39h06a4308_0 - markupsafe=2.0.1=py39h27cfd23_0 - matplotlib=3.7.1=py39h06a4308_0 - matplotlib-base=3.7.1=py39h417a72b_0 - matplotlib-inline=0.1.6=py39h06a4308_0 - mccabe=0.7.0=pyhd3eb1b0_0 - mistune=0.8.4=py39h27cfd23_1000 - mkl=2021.4.0=h06a4308_640 - mkl-service=2.4.0=py39h7f8727e_0 - mkl_fft=1.3.1=py39hd3c417c_0 - mkl_random=1.2.2=py39h51133e4_0 - mock=4.0.3=pyhd3eb1b0_0 - more-itertools=8.12.0=pyhd3eb1b0_0 - mpc=1.1.0=h10f8cd9_1 - mpfr=4.0.2=hb69a4c5_1 - mpi=1.0=mpich - mpich=3.3.2=external_0 - mpmath=1.2.1=py39h06a4308_0 - msgpack-python=1.0.3=py39hd09550d_0 - multidict=6.0.2=py39h5eee18b_0 - multipledispatch=0.6.0=py39h06a4308_0 - munkres=1.1.4=py_0 - mypy_extensions=0.4.3=py39h06a4308_1 - navigator-updater=0.3.0=py39h06a4308_0 - nbclassic=0.5.2=py39h06a4308_0 - nbclient=0.5.13=py39h06a4308_0 - nbconvert=6.4.4=py39h06a4308_0 - nbformat=5.7.0=py39h06a4308_0 - ncurses=6.4=h6a678d5_0 - nest-asyncio=1.5.6=py39h06a4308_0 - networkx=2.8.4=py39h06a4308_1 - ninja=1.10.2=h06a4308_5 - ninja-base=1.10.2=hd09550d_5 - nltk=3.7=pyhd3eb1b0_0 - notebook=6.5.2=py39h06a4308_0 - notebook-shim=0.2.2=py39h06a4308_0 - nspr=4.33=h295c915_0 - nss=3.74=h0370c37_0 - numba=0.56.4=py39h417a72b_0 - numexpr=2.8.4=py39he184ba9_0 - numpy=1.23.5=py39h14f4228_0 - numpy-base=1.23.5=py39h31eccc5_0 - numpydoc=1.5.0=py39h06a4308_0 - oauthlib=3.2.2=pyhd8ed1ab_0 - oniguruma=6.9.7.1=h27cfd23_0 - openjpeg=2.4.0=h3ad879b_0 - openpyxl=3.0.10=py39h5eee18b_0 - openssl=1.1.1t=h7f8727e_0 - packaging=23.0=py39h06a4308_0 - pandas=1.4.2=py39h295c915_0 - pandocfilters=1.5.0=pyhd3eb1b0_0 - panel=0.14.3=py39h06a4308_0 - param=1.12.3=py39h06a4308_0 - parsel=1.6.0=py39h06a4308_0 - parso=0.8.3=pyhd3eb1b0_0 - partd=1.2.0=pyhd3eb1b0_1 - patch=2.7.6=h7b6447c_1001 - patchelf=0.17.2=h6a678d5_0 - pathlib=1.0.1=pyhd3eb1b0_1 - pathspec=0.10.3=py39h06a4308_0 - patsy=0.5.3=py39h06a4308_0 - pcre=8.45=h295c915_0 - pep8=1.7.1=py39h06a4308_1 - pexpect=4.8.0=pyhd3eb1b0_3 - pickleshare=0.7.5=pyhd3eb1b0_1003 - pillow=9.4.0=py39h6a678d5_0 - pip=23.0.1=py39h06a4308_0 - pkginfo=1.8.3=py39h06a4308_0 - platformdirs=2.5.2=py39h06a4308_0 - plotly=5.9.0=py39h06a4308_0 - pluggy=1.0.0=py39h06a4308_1 - ply=3.11=py39h06a4308_0 - pooch=1.4.0=pyhd3eb1b0_0 - poyo=0.5.0=pyhd3eb1b0_0 - prometheus_client=0.14.1=py39h06a4308_0 - prompt-toolkit=3.0.36=py39h06a4308_0 - prompt_toolkit=3.0.36=hd3eb1b0_0 - protego=0.1.16=py_0 - protobuf=3.20.3=py39h6a678d5_0 - psutil=5.9.0=py39h5eee18b_0 - ptyprocess=0.7.0=pyhd3eb1b0_2 - pure_eval=0.2.2=pyhd3eb1b0_0 - py=1.11.0=pyhd3eb1b0_0 - py-lief=0.12.3=py39h6a678d5_0 - pyasn1=0.4.8=pyhd3eb1b0_0 - pyasn1-modules=0.2.8=py_0 - pycodestyle=2.10.0=py39h06a4308_0 - pycosat=0.6.4=py39h5eee18b_0 - pycparser=2.21=pyhd3eb1b0_0 - pyct=0.5.0=py39h06a4308_0 - pycurl=7.45.2=py39h37d81fd_0 - pydispatcher=2.0.5=py39h06a4308_2 - pydocstyle=6.3.0=py39h06a4308_0 - pyerfa=2.0.0=py39h27cfd23_0 - pyflakes=3.0.1=py39h06a4308_0 - pygments=2.11.2=pyhd3eb1b0_0 - pyhamcrest=2.0.2=pyhd3eb1b0_2 - pyjwt=2.4.0=py39h06a4308_0 - pylint=2.16.2=py39h06a4308_0 - pylint-venv=2.3.0=py39h06a4308_0 - pyls-spyder=0.4.0=pyhd3eb1b0_0 - pyodbc=4.0.34=py39h6a678d5_0 - pyopenssl=23.0.0=py39h06a4308_0 - pyparsing=3.0.9=py39h06a4308_0 - pyqt=5.15.7=py39h6a678d5_1 - pyqt5-sip=12.11.0=py39h6a678d5_1 - pyqtwebengine=5.15.7=py39h6a678d5_1 - pyrsistent=0.18.0=py39heee7806_0 - pysocks=1.7.1=py39h06a4308_0 - pytables=3.7.0=py39hf19a122_1 - pytest=7.1.2=py39h06a4308_0 - python=3.9.12=h12debd9_1 - python-dateutil=2.8.2=pyhd3eb1b0_0 - python-fastjsonschema=2.16.2=py39h06a4308_0 - python-libarchive-c=2.9=pyhd3eb1b0_1 - python-lsp-black=1.2.1=py39h06a4308_0 - python-lsp-jsonrpc=1.0.0=pyhd3eb1b0_0 - python-lsp-server=1.7.1=py39h06a4308_0 - python-slugify=5.0.2=pyhd3eb1b0_0 - python-snappy=0.6.1=py39h6a678d5_0 - python_abi=3.9=2_cp39 - pytoolconfig=1.2.5=py39h06a4308_1 - pytorch=1.12.1=cpu_py39hb1f1ab4_1 - pytz=2022.7=py39h06a4308_0 - pyu2f=0.1.5=pyhd8ed1ab_0 - pyviz_comms=2.0.2=pyhd3eb1b0_0 - pywavelets=1.4.1=py39h5eee18b_0 - pyxdg=0.27=pyhd3eb1b0_0 - pyyaml=6.0=py39h5eee18b_1 - pyzmq=23.2.0=py39h6a678d5_0 - qdarkstyle=3.0.2=pyhd3eb1b0_0 - qstylizer=0.2.2=py39h06a4308_0 - qt-main=5.15.2=h327a75a_7 - qt-webengine=5.15.9=hd2b0992_4 - qtawesome=1.2.2=py39h06a4308_0 - qtconsole=5.4.0=py39h06a4308_0 - qtpy=2.2.0=py39h06a4308_0 - qtwebkit=5.212=h4eab89a_4 - queuelib=1.5.0=py39h06a4308_0 - readline=8.2=h5eee18b_0 - regex=2022.7.9=py39h5eee18b_0 - requests=2.28.1=py39h06a4308_1 - requests-file=1.5.1=pyhd3eb1b0_0 - requests-oauthlib=1.3.1=pyhd8ed1ab_0 - ripgrep=13.0.0=hbdeaff8_0 - rope=1.7.0=py39h06a4308_0 - rsa=4.9=pyhd8ed1ab_0 - rtree=1.0.1=py39h06a4308_0 - ruamel.yaml=0.17.21=py39h5eee18b_0 - ruamel.yaml.clib=0.2.6=py39h5eee18b_1 - ruamel_yaml=0.15.100=py39h27cfd23_0 - scikit-image=0.19.3=py39h6a678d5_1 - scikit-learn=1.2.1=py39h6a678d5_0 - scikit-learn-intelex=2023.0.2=py39h06a4308_0 - scipy=1.10.0=py39h14f4228_1 - scrapy=2.8.0=py39h06a4308_0 - seaborn=0.12.2=py39h06a4308_0 - secretstorage=3.3.1=py39h06a4308_1 - send2trash=1.8.0=pyhd3eb1b0_1 - service_identity=18.1.0=pyhd3eb1b0_1 - setuptools=65.6.3=py39h06a4308_0 - sip=6.6.2=py39h6a678d5_0 - six=1.16.0=pyhd3eb1b0_1 - smart_open=5.2.1=py39h06a4308_0 - snappy=1.1.9=h295c915_0 - sniffio=1.2.0=py39h06a4308_1 - snowballstemmer=2.2.0=pyhd3eb1b0_0 - sortedcontainers=2.4.0=pyhd3eb1b0_0 - soupsieve=2.3.2.post1=py39h06a4308_0 - sphinx=5.0.2=py39h06a4308_0 - sphinxcontrib-applehelp=1.0.2=pyhd3eb1b0_0 - sphinxcontrib-devhelp=1.0.2=pyhd3eb1b0_0 - sphinxcontrib-htmlhelp=2.0.0=pyhd3eb1b0_0 - sphinxcontrib-jsmath=1.0.1=pyhd3eb1b0_0 - sphinxcontrib-qthelp=1.0.3=pyhd3eb1b0_0 - sphinxcontrib-serializinghtml=1.1.5=pyhd3eb1b0_0 - spyder=5.4.2=py39h06a4308_0 - spyder-kernels=2.4.2=py39h06a4308_0 - sqlalchemy=1.4.39=py39h5eee18b_0 - sqlite=3.41.1=h5eee18b_0 - stack_data=0.2.0=pyhd3eb1b0_0 - statsmodels=0.13.5=py39h7deecbd_1 - sympy=1.11.1=py39h06a4308_0 - tabulate=0.8.10=py39h06a4308_0 - tbb=2021.7.0=hdb19cb5_0 - tbb4py=2021.7.0=py39hdb19cb5_0 - tblib=1.7.0=pyhd3eb1b0_0 - tenacity=8.0.1=py39h06a4308_1 - tensorboard=2.11.0=py39h06a4308_0 - tensorboard-data-server=0.6.1=py39h52d8a92_0 - tensorboard-plugin-wit=1.8.1=pyhd8ed1ab_0 - terminado=0.17.1=py39h06a4308_0 - testpath=0.6.0=py39h06a4308_0 - text-unidecode=1.3=pyhd3eb1b0_0 - textdistance=4.2.1=pyhd3eb1b0_0 - threadpoolctl=2.2.0=pyh0d69192_0 - three-merge=0.1.1=pyhd3eb1b0_0 - tifffile=2021.7.2=pyhd3eb1b0_2 - tinycss2=1.2.1=py39h06a4308_0 - tk=8.6.12=h1ccaba5_0 - tldextract=3.2.0=pyhd3eb1b0_0 - tokenizers=0.11.4=py39h3dcd8bd_1 - toml=0.10.2=pyhd3eb1b0_0 - tomli=2.0.1=py39h06a4308_0 - tomlkit=0.11.1=py39h06a4308_0 - toolz=0.12.0=py39h06a4308_0 - tornado=6.2=py39h5eee18b_0 - tqdm=4.64.1=py39h06a4308_0 - traitlets=5.7.1=py39h06a4308_0 - transformers=4.24.0=py39h06a4308_0 - twisted=22.2.0=py39h5eee18b_1 - typing-extensions=4.4.0=py39h06a4308_0 - typing_extensions=4.4.0=py39h06a4308_0 - tzdata=2022g=h04d1e81_0 - ujson=5.4.0=py39h6a678d5_0 - unidecode=1.2.0=pyhd3eb1b0_0 - unixodbc=2.3.11=h5eee18b_0 - urllib3=1.26.14=py39h06a4308_0 - w3lib=1.21.0=pyhd3eb1b0_0 - watchdog=2.1.6=py39h06a4308_0 - wcwidth=0.2.5=pyhd3eb1b0_0 - webencodings=0.5.1=py39h06a4308_1 - websocket-client=0.58.0=py39h06a4308_4 - werkzeug=2.0.3=pyhd3eb1b0_0 - whatthepatch=1.0.2=py39h06a4308_0 - wheel=0.38.4=py39h06a4308_0 - widgetsnbextension=4.0.5=py39h06a4308_0 - wrapt=1.14.1=py39h5eee18b_0 - wurlitzer=3.0.2=py39h06a4308_0 - xarray=2022.11.0=py39h06a4308_0 - xz=5.2.10=h5eee18b_1 - yaml=0.2.5=h7b6447c_0 - yapf=0.31.0=pyhd3eb1b0_0 - yarl=1.7.2=py39hb9d737c_2 - zeromq=4.3.4=h2531618_0 - zfp=0.5.5=h295c915_6 - zict=2.1.0=py39h06a4308_0 - zipp=3.11.0=py39h06a4308_0 - zlib=1.2.13=h5eee18b_0 - zope=1.0=py39h06a4308_1 - zope.interface=5.4.0=py39h7f8727e_0 - zstandard=0.19.0=py39h5eee18b_0 - zstd=1.5.2=ha4553b6_0 prefix: /projects/ff_project/users/ff_li/anaconda3 ```
pip_packages
``` aiofiles==23.1.0 aiohttp==3.8.4 aiosignal==1.3.1 anyio==3.6.2 appdirs==1.4.4 argcomplete==3.0.3 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 asgiref==3.6.0 asttokens==2.2.1 async-timeout==4.0.2 attrs==22.2.0 azure-core==1.26.4 azure-identity==1.12.0 azure-storage-blob==12.16.0 backcall==0.2.0 backoff==2.2.1 bcrypt==4.0.1 beautifulsoup4==4.12.0 bentoml==1.0.18 bleach==6.0.0 blinker==1.6.2 boto3==1.26.95 botocore==1.29.95 bracex==2.3.post1 Brotli==1.0.9 build==0.10.0 cachetools==5.3.0 cattrs==22.2.0 certifi==2022.12.7 cffi==1.15.1 charset-normalizer==2.1.1 circus==0.18.0 click==8.1.3 click-option-group==0.5.5 cloudpickle==2.2.1 cmake==3.25.0 comm==0.1.2 contextlib2==21.6.0 contourpy==1.0.7 cryptography==39.0.2 cycler==0.11.0 dacite==1.7.0 debugpy==1.6.6 decorator==5.1.1 deepmerge==1.1.0 defusedxml==0.7.1 Deprecated==1.2.13 dill==0.3.6 dnspython==2.3.0 docker-pycreds==0.4.0 entrypoints==0.4 eventlet==0.33.3 exceptiongroup==1.1.1 executing==1.2.0 fastjsonschema==2.16.3 fiftyone==0.12.1 fiftyone-brain==0.11.0 fiftyone-db==0.4.0 filelock==3.9.0 Flask==2.3.1 fonttools==4.39.2 fqdn==1.5.1 frozenlist==1.3.3 fs==2.4.16 ftfy==6.1.1 future==0.18.3 gitdb==4.0.10 GitPython==3.1.31 glob2==0.7 google-api-core==2.11.0 google-api-python-client==2.82.0 google-auth==2.16.2 google-auth-httplib2==0.1.0 google-cloud-core==2.3.2 google-cloud-storage==2.7.0 google-crc32c==1.5.0 google-resumable-media==2.4.1 googleapis-common-protos==1.59.0 graphql-core==3.2.3 greenlet==2.0.2 h11==0.14.0 h2==4.1.0 hpack==4.0.0 httpcore==0.16.3 httplib2==0.21.0 httpx==0.23.3 huggingface-hub==0.13.3 hypercorn==0.14.3 hyperframe==6.0.1 idna==3.4 imageio==2.25.0 importlib-metadata==6.0.0 importlib-resources==5.12.0 inflate64==0.3.1 ipykernel==6.20.2 ipython==8.8.0 ipython-genutils==0.2.0 ipywidgets==8.0.4 isodate==0.6.1 isoduration==20.11.0 itsdangerous==2.1.2 jedi==0.18.2 Jinja2==3.1.2 jmespath==1.0.1 joblib==1.2.0 jsonlines==3.1.0 jsonpointer==2.3 jsonschema==4.17.3 jupyter==1.0.0 jupyter-console==6.4.4 jupyter-events==0.6.3 jupyter_client==7.4.9 jupyter_core==5.1.3 jupyter_server==2.1.0 jupyter_server_terminals==0.4.4 jupyterlab-pygments==0.2.2 jupyterlab-widgets==3.0.5 kaleido==0.2.1 kiwisolver==1.4.4 lazy_loader==0.2 lit==15.0.7 llvmlite==0.39.1 markdown-it-py==2.2.0 MarkupSafe==2.1.2 matplotlib==3.7.1 matplotlib-inline==0.1.6 mdurl==0.1.2 minio==7.1.14 mistune==2.0.5 mongoengine==0.24.2 motor==3.1.1 mpmath==1.2.1 msal==1.22.0 msal-extensions==1.0.0 multidict==6.0.4 multivolumefile==0.2.3 nbclassic==0.5.3 nbclient==0.7.2 nbconvert==7.2.10 nbformat==5.8.0 ndjson==0.3.1 nest-asyncio==1.5.6 networkx==3.0 notebook==6.5.3 notebook_shim==0.2.2 numba==0.56.4 numpy==1.23.5 opencv-python-headless==4.7.0.72 opentelemetry-api==1.14.0 opentelemetry-exporter-otlp-proto-http==1.14.0 opentelemetry-instrumentation==0.35b0 opentelemetry-instrumentation-aiohttp-client==0.35b0 opentelemetry-instrumentation-asgi==0.35b0 opentelemetry-proto==1.14.0 opentelemetry-sdk==1.14.0 opentelemetry-semantic-conventions==0.35b0 opentelemetry-util-http==0.35b0 packaging==23.0 pandas==1.5.3 pandocfilters==1.5.0 paramiko==3.1.0 parso==0.8.3 pathspec==0.11.1 pathtools==0.1.2 patool==1.12 patsy==0.5.3 pexpect==4.8.0 pickleshare==0.7.5 Pillow==9.3.0 pip-requirements-parser==32.0.1 pip-tools==6.13.0 platformdirs==3.1.1 plotly==5.13.1 portalocker==2.7.0 pprintpp==0.4.0 priority==2.0.0 prometheus-client==0.16.0 prompt-toolkit==3.0.38 protobuf==3.20.3 psutil==5.9.4 ptyprocess==0.7.0 pure-eval==0.2.2 py7zr==0.20.5 pyasn1==0.4.8 pyasn1-modules==0.2.8 pybcj==1.0.1 pycparser==2.21 pycryptodomex==3.17 Pygments==2.14.0 PyJWT==2.6.0 pymongo==4.3.3 PyNaCl==1.5.0 pynndescent==0.5.9 pynvml==11.5.0 pyparsing==3.0.9 pyppmd==1.0.0 pyproject_hooks==1.0.0 pyrsistent==0.19.3 pysftp==0.2.9 python-dateutil==2.8.2 python-json-logger==2.0.7 python-multipart==0.0.6 pytz==2022.7.1 pytz-deprecation-shim==0.1.0.post0 PyWavelets==1.4.1 PyYAML==6.0 pyzmq==25.0.2 pyzstd==0.15.6 qtconsole==5.4.1 QtPy==2.3.0 rarfile==4.0 regex==2023.3.23 requests==2.28.1 requests-toolbelt==0.10.1 retrying==1.3.4 rfc3339-validator==0.1.4 rfc3986==1.5.0 rfc3986-validator==0.1.1 rich==13.3.4 rsa==4.9 s3transfer==0.6.0 safetensors==0.3.0 schedule==1.1.0 schema==0.7.5 scikit-image==0.20.0 scikit-learn==1.2.2 scipy==1.9.1 seaborn==0.12.2 Send2Trash==1.8.0 sentry-sdk==1.17.0 setproctitle==1.3.2 simple-di==0.1.5 six==1.16.0 smmap==5.0.0 snakeviz==2.1.2 sniffio==1.3.0 sortedcontainers==2.4.0 soupsieve==2.4 sse-starlette==0.10.3 sseclient-py==1.7.2 stack-data==0.6.2 starlette==0.20.4 statsmodels==0.13.5 strawberry-graphql==0.138.1 sympy==1.11.1 tabulate==0.9.0 tenacity==8.2.2 terminado==0.17.1 texttable==1.6.7 threadpoolctl==3.1.0 tifffile==2023.3.15 timm==0.8.15.dev0 tinycss2==1.2.1 toml==0.10.2 tomli==2.0.1 torch==2.0.0+cu118 torchaudio==2.0.1+cu118 torchvision==0.15.1+cu118 tornado==6.2 tqdm==4.65.0 traitlets==5.9.0 triton==2.0.0 typing_extensions==4.4.0 tzdata==2022.7 tzlocal==4.3 umap-learn==0.5.3 universal-analytics-python3==1.1.1 uri-template==1.2.0 uritemplate==4.1.1 urllib3==1.26.13 uvicorn==0.21.1 voxel51-eta==0.9.0 wandb==0.14.0 watchfiles==0.19.0 wcmatch==8.4.1 wcwidth==0.2.6 webcolors==1.12 webencodings==0.5.1 websocket-client==1.5.1 Werkzeug==2.3.0 widgetsnbextension==4.0.6 wrapt==1.15.0 wsproto==1.2.0 xmltodict==0.13.0 yarl==1.8.2 zipp==3.15.0 ```
liyi01827 commented 1 year ago

I've investigated other solved issues related to Multipart. The issue is solved when I upgrade to the starlette from version 0.20.4 to 0.24.0. I guess when installing bentoml, the package dependency conflicts could be checked. Is this the correct way to avoid unpredictable results?

bojiang commented 1 year ago

help to ping @sauyon

jakthra commented 11 months ago

@liyi01827 Can confirm this is the case for starlette <0.24. Sent a PR for updating the version.

vijayeminds commented 10 months ago

is curl was working for you before this error, i got the same error, curl is working but.., got this error, and my starlette version also >0.24