【问题标题】:I am getting error while running this part of the code. tried some of the existing solutions, none of them helped运行这部分代码时出现错误。尝试了一些现有的解决方案,但都没有帮助
【发布时间】:2020-09-20 02:53:51
【问题描述】:
for face_location in face_locations:
top , right, bottom , left = face_location
print("A face is located at the pixel locations Top: {} , Right:{} , Left: {} , Bottom: {}.")

   **** I always get this error:****

 File "<ipython-input-55-23558b69803e>", line 1
for face_location in face_locations:

^SyntaxError: 解析时出现意外 EOF

【问题讨论】:

  • 当出现任何错误时,实际的错误通常是上一行或下一行

标签: python image-recognition


【解决方案1】:

可能是您忘记在 for 循环后使用制表符吗? 而不是

for face_location in face_locations:
top , right, bottom , left = face_location

for face_location in face_locations:
    top , right, bottom , left = face_location

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-03-16
    • 2022-10-15
    • 1970-01-01
    • 1970-01-01
    • 2011-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多