作者shamen (watin)
看板Python
標題[問題] 關於python+opencv的錯誤訊息
時間Wed Mar 30 15:43:17 2011
目前在linux 上使用python+opencv 遇到了一個錯誤
想請各位幫我看一下,該從哪邊下手解決?
--------------------錯誤訊息------------------------------------
Traceback (most recent call last):
File "PythonOpencvFacedetect.py", line 87, in <module>
if input_name.isdigit():
AttributeError: 'int' object has no attribute 'isdigit'
----------------------------------------------------------------
麻煩各位了,謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.26.229.128
推 AlanSung:input_name 應該是 str (才有 isdigit()), 你的是 int 03/30 16:02
推 hilorrk:讓我猜 你應該是用python3.X? openCV是用2.6/2.7 03/30 16:03
→ hilorrk:因為input()改變了 3.X變string 2.7的是eval(raw_input()) 03/30 16:05
→ hilorrk:不對 這樣應該是反過來才對 猜錯了XD 03/30 16:08