You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running a python script that has a very large path, sys.argv[0] = /home/myuser/.cache/bazel/_bazel_myuser/86d86849c94045e321482e95af59d89a/execroot/mymonorepo/bazel-out/k8-fastbuild/bin/src/applications/myapp/myapp.runfiles/mymonorepo/src/applications/myapp/src/server.py. This is because the application uses bazel as a monorepo manager.
But this causes aiomysql to fail to run :
File"/home/myuser/.cache/bazel/_bazel_myuser/86d86849c94045e321482e95af59d89a/execroot/mymonorepo/bazel-out/k8-fastbuild/bin/src/applications/myapp/myapp.runfiles/deps_python/pypi__aiomysql/aiomysql/connection.py", line782, in_request_authenticationdata+=struct.pack('B', len(connect_attrs)) +connect_attrsstruct.error: ubyteformatrequires0<=number<=255
...
raiseOperationalError(2003,
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '10.5.3.133'")
This happens because it tries to create a packet to be sent over the network with 256 bytes, but the big name of the program overflows that size.
The simplest solution would be to remove the path (or part of it) from the network packet. However, I don't know if this can cause any unexpected problems. As far as I've tested, it didn't cause any errors
I wonder if I can make a Pull Request that fixes this, leaving only the path after the last slash. Ex: from /home/myuser/.cache/bazel/_bazel_myuser/86d86849c94045e321482e95af59d89a/execroot/mymonorepo/bazel-out/k8-fastbuild/bin/src/applications/myapp/myapp.runfiles/mymonorepo/src/applications/myapp/src/server.py to server.py. This would solve my problem and that of some other people I saw while researching this error.
The text was updated successfully, but these errors were encountered:
I'm running a python script that has a very large
path
,sys.argv[0] = /home/myuser/.cache/bazel/_bazel_myuser/86d86849c94045e321482e95af59d89a/execroot/mymonorepo/bazel-out/k8-fastbuild/bin/src/applications/myapp/myapp.runfiles/mymonorepo/src/applications/myapp/src/server.py
. This is because the application uses bazel as a monorepo manager.But this causes
aiomysql
to fail to run :This happens because it tries to create a packet to be sent over the network with 256 bytes, but the big name of the program overflows that size.
aiomysql/aiomysql/connection.py
Lines 186 to 189 in 0a8af23
aiomysql/aiomysql/connection.py
Lines 778 to 782 in 0a8af23
The simplest solution would be to remove the path (or part of it) from the network packet. However, I don't know if this can cause any unexpected problems. As far as I've tested, it didn't cause any errors
I wonder if I can make a Pull Request that fixes this, leaving only the
path
after the last slash. Ex: from/home/myuser/.cache/bazel/_bazel_myuser/86d86849c94045e321482e95af59d89a/execroot/mymonorepo/bazel-out/k8-fastbuild/bin/src/applications/myapp/myapp.runfiles/mymonorepo/src/applications/myapp/src/server.py
toserver.py
. This would solve my problem and that of some other people I saw while researching this error.The text was updated successfully, but these errors were encountered: