我正在尝试在Maximo 7.6.1.1中使用Jython自动化脚本:from psdi.iface.router import HTTPHandlerfrom java.util import HashMapfrom java.util import Stringhandler = HTTPHandler()map = HashMap()map.put("URL",url)map.put("HTTPMETHOD","GET")responseBytes = handler.invoke(map,None)response = String(responseBytes,"utf-8")但是,我在第 3 行遇到错误:ImportError: cannot import name String in <script> at line number 3我可以通过删除除第 3 行之外的所有内容来隔离错误:from java.util import String-------------------------------------------------------------------ImportError: cannot import name String in <script> at line number 1为什么我不能将Stringfrom导入java.util到我的 Jython 脚本中?
添加回答
举报
0/150
提交
取消