The error message suggests that you are trying to call the update() method on a list object, which is not supported.

To fix this, you need to ensure that the tags_merge[id] value is a set object before calling the update() method. Here's an updated version of your code:

for parameter in parameters[0]['input_3'][0]:
    id = parameter['container']
    tags = parameter['tags']
    if id not in tags_merge:
        if tags:
            tags_merge[id] = set(tags)
        else:
            tags_merge[id] = set('-')
    else:
        if tags:
            tags_merge[id].update(tags)
        else:
            tags_merge[id].update('-')

In this updated code, the update() method is only called if tags is not empty. Otherwise, it updates the set with a single '-' character

for parameter in parameters0input_30 id = parametercontainer tags = parametertags if id not in tags_merge if tags tags_mergeid = settags else

原文地址: https://www.cveoy.top/t/topic/iKhG 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录