类型错误:当调用一个函数时,'str'对象不可调用。

问题描述 投票:0回答:1

我正在调用这个巨大的函数。

arc(w, d, h, name, old_sx_value_1, old_ex_value_1, old_ey_value_1, old_sy_value_4, old_ey_value_4,
    old_ex_value_5, old_sx_value_7, old_sy_value_10, old_sx_value_13, old_ex_value_16, old_sx_value_17,
    old_sx_value_19, old_sy_value_19, old_sy_value_21)

问题是,我收到了这个错误。

    ...old_sx_value_19, old_sy_value_19, old_sy_value_21)
TypeError: 'str' object is not callable

我检查了一下,这里唯一的str是 "name",其他的都是floats.上面的变量都不是全局变量,但是我的路径有全局变量。

python string function typeerror global
1个回答
0
投票

TypeError: 'str' object is not callable因为我有一个全局变量,名字和我的函数一样,我只是把它重命名,它就工作了。

© www.soinside.com 2019 - 2024. All rights reserved.