【问题标题】:how do i fix pepper's facial recognition after it detects it?检测到辣椒的面部识别后如何修复它?
【发布时间】:2021-10-08 09:15:47
【问题描述】:

我正在用 Choregraphe 编写辣椒程序,我试图在它识别出面部后定义第二次交互,但是一旦我开始交互,它就会给我这个错误。另外,如果我尝试定义全局变量,它会告诉我“NameError:未定义全局名称'Gender_user'”

[ERROR] behavior.box :_safeCallOfUserMethod:125 _Behavior__lastUploadedChoregrapheBehaviorbehavior_11199696904:/second_interaction_20/get_data_7: Traceback (most recent call last): File "/opt/aldebaran/lib/python2.7/site-packages/albehavior.py", line 113, in _safeCallOfUserMethod func(functionArg) File "<string>", line 152, in onInput_onStart UnboundLocalError: local variable 'Gender_user' referenced before assignment

【问题讨论】:

  • 请提供您的行为以获得更明确的帮助。看起来您只是编码错误。

标签: python pepper choregraphe


【解决方案1】:

错误来自您的盒子get_data的Python代码,它在分配之前引用了Gender_user。请检查您的代码。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多