Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Why do i get "ImportError: sys.meta_path is None, Python is likely shutting down" when trying to run Milvus #2282

Open
VanechikSpace opened this issue Oct 3, 2024 · 4 comments
Labels
kind/bug Something isn't working milvus-lite Issues related to milvus-lite

Comments

@VanechikSpace
Copy link

VanechikSpace commented Oct 3, 2024

Describe the bug

When i run the following code:

from pymilvus import MilvusClient

client = MilvusClient("milvus.db")
print("hello")

i see the following result:

hello
Exception ignored in: <function ServerManager.__del__ at 0x7f3d1f9a2f20>
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/milvus_lite/server_manager.py", line 58, in __del__
  File "/usr/local/lib/python3.12/dist-packages/milvus_lite/server_manager.py", line 53, in release_all
  File "/usr/local/lib/python3.12/dist-packages/milvus_lite/server.py", line 118, in stop
  File "/usr/lib/python3.12/pathlib.py", line 1164, in __init__
  File "/usr/lib/python3.12/pathlib.py", line 358, in __init__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Server.__del__ at 0x7f3d1f9a2d40>
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/milvus_lite/server.py", line 122, in __del__
  File "/usr/local/lib/python3.12/dist-packages/milvus_lite/server.py", line 118, in stop
  File "/usr/lib/python3.12/pathlib.py", line 1164, in __init__
  File "/usr/lib/python3.12/pathlib.py", line 358, in __init__
ImportError: sys.meta_path is None, Python is likely shutting down

qwer.db file is created but i don't want to get this error

Expected Behavior

I don't want to get this error

Environment details

- Method of installation (Docker, or from source): sudo pip install pymilvus pymilvus[model] pymilvus[bulk_writer] --break-system-packages

- pymilvus version: 2.4.7

Anything else?

I tried to run this code:

from pymilvus import MilvusClient

try:
    client = MilvusClient("qwer.db")
finally:
    client.close()

but the result is the same.

UPD
I have managed to fix the issue by moving to python3.9 from python3.12.

So pymilvus doesn't support python3.12 ?

@VanechikSpace VanechikSpace added the kind/bug Something isn't working label Oct 3, 2024
@XuanYang-cn XuanYang-cn added the milvus-lite Issues related to milvus-lite label Oct 14, 2024
@XuanYang-cn
Copy link
Contributor

Looks like an issue of Milvus-lite

@XuanYang-cn
Copy link
Contributor

/assign @junjiejiangjjj

@sre-ci-robot
Copy link

@XuanYang-cn: GitHub didn't allow me to assign the following users: junjiejiangjjj.

Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @junjiejiangjjj

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@junjiejiangjjj
Copy link
Contributor

hi @VanechikSpace , I run it with Python 3.12.4 and it works fine. You can use conda to recreate a Python 3.12 environment and try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working milvus-lite Issues related to milvus-lite
Projects
None yet
Development

No branches or pull requests

4 participants