我得到python错误: TypeError:join()只接受set_Xpress方法第139行中的一个参数(给定2个),如下所示:
from os import path
from json import load
...
def set_Xpress(Xpress_number, special_ts, disk, platform, testcase):
...
with open("{0}:\\BBT2\\Configuration\\temporary.tmp".format(disk), "r") as test_conf_file_r:
test_conf_vocab = load(test_conf_file_r)
report = path.join(test_conf_vocab["report_dir"], test_conf_vocab["report_name"])
...
请帮我弄清楚是什么原因造成的。pythonshell毫无问题地执行它,同样的笔划在这个tmp文件的另一个方法中执行得很好。提前谢谢。在
{a1}接受任意数量的参数。您确定您的
path.join
实际上正在调用os.path.join
?在path
不是os.path
模块,它是一个字符串。你在某个地方重新定义了它。在当然os.path.join操作系统()使用了尽可能多的参数,就像有人说您肯定已将路径重新定义为新变量并存储为字符串,因此请小心关于。不过我绝对是这样做的,经过长时间的搜索和尝试,我发现了我的错误。在
相关问题 更多 >
编程相关推荐