enable_auth has some error in windows
kun1996 opened this issue · comments
py4j/py4j-python/src/py4j/java_gateway.py line 341-342
if enable_auth: _auth_token = proc.stdout.readline()[:-1]
In windows, if enable_auth is true, stdout.readline() will end with \r\n
_auth_token will error, maybe can use rstrip()
`
from py4j.java_gateway import JavaGateway
gateway = JavaGateway.launch_gateway(enable_auth=True)
random = gateway.jvm.java.util.Random()
`
This is test code in windows, I find that CI only tested ubuntu, I don't know if there are plans to support Windows
The auth token might have newline characters so we should do something like -len(os.linesep)
instead of -1
.
We should probably setup a CI with Windows too e.g., AppVeyor.
@kun1996 are you interested in trying to set Windows CI up? that would be super great improvement in Py4J project ..
Yeah. I'd be happy to