minio / minio-py

MinIO Client SDK for Python

Home Page:https://docs.min.io/docs/python-client-quickstart-guide.html

Repository from Github https://github.comminio/minio-pyRepository from Github https://github.comminio/minio-py

Add urllib3 requirements for minio>=7.2.1

luiz0992 opened this issue · comments

Hi,

When running minio version 7.2.1 I am getting this error

(shelle-backend) LGuedesdosSantoss-MacBook-Pro:shellai-nlp-backend l.guedesdossantos$ python app.py
Traceback (most recent call last):
  File "/Users/l.guedesdossantos/Documents/codes/shellai-nlp-backend/app.py", line 5, in <module>
    from app.azureservicebus.bus_listener_thread import start_listeners
  File "/Users/l.guedesdossantos/Documents/codes/shellai-nlp-backend/app/azureservicebus/bus_listener_thread.py", line 10, in <module>
    from app.azureservicebus.vector_clearing import TempDBClearingQueueListener, VectorClearingQueueListener
  File "/Users/l.guedesdossantos/Documents/codes/shellai-nlp-backend/app/azureservicebus/vector_clearing.py", line 8, in <module>
    from app.postgresqldb.vector import MilvusVectorDatabase, PostgresVectorDatabase
  File "/Users/l.guedesdossantos/Documents/codes/shellai-nlp-backend/app/postgresqldb/vector.py", line 11, in <module>
    from pymilvus import connections, utility, db
  File "/Users/l.guedesdossantos/anaconda3/envs/shelle-backend/lib/python3.11/site-packages/pymilvus/__init__.py", line 26, in <module>
    from .bulk_writer.remote_bulk_writer import (
  File "/Users/l.guedesdossantos/anaconda3/envs/shelle-backend/lib/python3.11/site-packages/pymilvus/bulk_writer/remote_bulk_writer.py", line 18, in <module>
    from minio import Minio
  File "/Users/l.guedesdossantos/anaconda3/envs/shelle-backend/lib/python3.11/site-packages/minio/__init__.py", line 41, in <module>
    from .api import Minio
  File "/Users/l.guedesdossantos/anaconda3/envs/shelle-backend/lib/python3.11/site-packages/minio/api.py", line 44, in <module>
    from urllib3.response import BaseHTTPResponse
ImportError: cannot import name 'BaseHTTPResponse' from 'urllib3.response' (/Users/l.guedesdossantos/anaconda3/envs/shelle-backend/lib/python3.11/site-packages/urllib3/response.py)

I noticed when I changed the minio to 7.2.0 or when I upgrade urllib3 to >=2.0 I don't get this error anymore. This happens due to a change at line 44 of /minio/api.py. It changed from HTTPResponse to BaseHTTPResponse. The lastest is only supported at urllib3 >=2.0.

Please add requirements for minio >=7.2.1 to use urllib3 >=2.0.

Just saw this is duplicated