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]: reverse_image_search failed while run with custom MYSQL_PORT #790

Closed
1 task done
matrixji opened this issue Oct 19, 2021 · 1 comment
Closed
1 task done
Assignees
Labels
bug Something isn't working enhancement New feature or request hacktoberfest

Comments

@matrixji
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Follow the guide, deploy the reverse_image_search example, while using the non-default port for MySql and using env MYSQL_PORT pass it to the server. But server start failed.

Trackback log:

Traceback (most recent call last):
  File "src/main.py", line 33, in <module>
    MYSQL_CLI = MySQLHelper()
  File "/home/jibin/1018/bootcamp/solutions/reverse_image_search/quick_deploy/server/src/mysql_helpers.py", line 11, in __init__
    local_infile=True)
  File "/home/jibin/1018/bootcamp/solutions/reverse_image_search/quick_deploy/server/venv/lib/python3.6/site-packages/pymysql/connections.py", line 290, in __init__
    raise ValueError("port should be of type int")
ValueError: port should be of type int

Expected Behavior

Hope server started

Steps To Reproduce

1. export MYSQL_PORT=33060
2. start server by code python main.py
3. Got error output.

Software version

Milvus: 2.0.0rc7, not related
Server: N/A
Client: N/A

Anything else?

Have some investigation on code, in config.py some value are read from env, but the code like MYSQL_PORT = os.getenv("MYSQL_PORT", 3306) will always got a string value while MYSQL_PORT is set, so a type cast to number here is needed.

I'll raise PR for fix it.

matrixji added a commit to matrixji/bootcamp that referenced this issue Oct 19, 2021
using `int(os.getenv('NAME', 0))` instead of `os.getenv('NAME', 0)`

Resolve issue: milvus-io#790

Signed-off-by: Ji Bin <[email protected]>
matrixji added a commit to matrixji/bootcamp that referenced this issue Oct 19, 2021
using `int(os.getenv('NAME', 0))` instead of `os.getenv('NAME', 0)`

Resolve issue: milvus-io#790

Signed-off-by: Ji Bin <[email protected]>
@shiyu22 shiyu22 added hacktoberfest bug Something isn't working enhancement New feature or request labels Oct 19, 2021
@shiyu22
Copy link
Contributor

shiyu22 commented Oct 19, 2021

Thank you very much :)

Close with #791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants