gpt4 book ai didi

Windows 中的 Python h2o : cannot initialize (TypeError: argument of type 'NoneType' is not iterable)

转载 作者:可可西里 更新时间:2023-11-01 09:36:53 27 4
gpt4 key购买 nike

我正在尝试在我的公司使用 python h2o。

使用命令后:

>import h2o
> h2o.init()

我得到了

h2o\connection.py:110: UserWarning: Proxy environment variable `HTTP_PROXY` with value `http://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection.
warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.")

h2o\connection.py:110: UserWarning: Proxy environment variable `HTTPS_PROXY` with value `https://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection.
warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.")


No instance found at ip and port: localhost:54321. Trying to start local jar...


JVM stdout: c:\users\zchen6\appdata\local\temp\tmpqwjtad\h2o_zchen6_started_from_python.out
JVM stderr: c:\users\zchen6\appdata\local\temp\tmpegwtrj\h2o_zchen6_started_from_python.err
Using ice_root: c:\users\zchen6\appdata\local\temp\tmpftvwrm

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "h2o\h2o.py", line 722, in init
password=password,max_mem_size_GB=max_mem_size_GB,min_mem_size_GB=min_mem_size_GB,proxies=proxies,size=size)

File "h2o\connection.py", line 133, in __init__
cld = self._start_local_h2o_jar(max_mem_size, min_mem_size, enable_assertions, license, ice_root, jar_path, nthreads)

File "h2o\connection.py", line 269, in _start_local_h2o_jar
jver = subprocess.check_output([command, "-version"], stderr=subprocess.STDOUT)

File "C:\Anaconda2\lib\subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)

File "C:\Anaconda2\lib\subprocess.py", line 710, in __init__
errread, errwrite)

File "C:\Anaconda2\lib\subprocess.py", line 913, in _execute_child
args = list2cmdline(args)

File "C:\Anaconda2\lib\subprocess.py", line 616, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg

TypeError: argument of type 'NoneType' is not iterable

我试图在 init() 中将值设置为名为 proxy 的变量,它仍然给我同样的错误。

尝试之后

h2o.init(start_h2o=False)

我得到了

h2o\connection.py:110: UserWarning: Proxy environment variable `HTTP_PROXY` with value `http://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection.
warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.")

h2o\connection.py:110: UserWarning: Proxy environment variable `HTTPS_PROXY` with value `https://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection.
warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.")


Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "h2o\h2o.py", line 722, in init
password=password,max_mem_size_GB=max_mem_size_GB,min_mem_size_GB=min_mem_size_GB,proxies=proxies,size=size)

File "h2o\connection.py", line 123, in __init__
if not start_h2o: raise ValueError("Cannot connect to H2O server. Please check that H2O is running at {}".format(H2OConnection.make_url("")))
ValueError: Cannot connect to H2O server. Please check that H2O is running at http://localhost:54321/3/

对了,我用的h2o版本是3.8.2.5。提前致谢。

最佳答案

关闭代理应该可以解决问题。

关于Windows 中的 Python h2o : cannot initialize (TypeError: argument of type 'NoneType' is not iterable),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37400821/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com