【问题标题】:Python error: SystemError: new style getargs format but argument is not a tuplePython错误:SystemError:新样式getargs格式但参数不是元组
【发布时间】:2021-10-29 13:12:27
【问题描述】:

我正在尝试运行这段代码(我没有这样做),但它抛出了这个错误,我不知道,有什么建议吗?

inFloor = np.array([cv.pointPolygonTest(floorPoly_m, pt, False) for pt in self.xyz[:,:2]]) >= 0

error: SystemError: new style getargs format but argument is not a tuple

显然错误出现在 pointPolygonTest 函数的第一个参数中,但该参数是这个数组,

[[7.177778 1.4777777]

[6.711111 1.7333333]

[6.388889 1.2333333]

[6.8444443 0.62222224]]

我试图将它转换为元组,但这个函数只接受数组..这对我来说很困惑

完整的错误输出在这里:

 File "/home/rsc/Desktop/GUI1_b/install/livox_detection/lib/python3.8/site-packages/livox_detection/pointCloudLib.py", line 419, in topView_measure
    inFloor = np.array([cv.pointPolygonTest(floorPoly_m, pt, False) for pt in self.xyz[:,:2]]) >= 0
  File "/home/rsc/Desktop/GUI1_b/install/livox_detection/lib/python3.8/site-packages/livox_detection/pointCloudLib.py", line 419, in <listcomp>
    inFloor = np.array([cv.pointPolygonTest(floorPoly_m, pt, False) for pt in self.xyz[:,:2]]) >= 0
SystemError: new style getargs format but argument is not a tuple

【问题讨论】:

标签: python numpy opencv


【解决方案1】:

通过更新opencv库解决:

pip3 install opencv-python --upgrade

【讨论】:

    猜你喜欢
    • 2015-12-16
    • 2018-04-26
    • 1970-01-01
    • 1970-01-01
    • 2012-10-24
    • 2019-05-02
    • 1970-01-01
    • 1970-01-01
    • 2017-12-28
    相关资源
    最近更新 更多