'module' object has no attribute 'find_blobs'
时间: 2023-08-05 11:04:06 浏览: 128
根据引用[1]和引用[2]的内容,问题出现的原因可能是Python版本升级导致函数名称发生了改变。你可以将原来的代码中的"image.find_blobs"改为"img.find_blobs"来解决这个问题。例如,将代码中的"for blobs in image.find_blobs(thresholds, pixels_threshold=200, area_threshold=200, merge=False):"改为"for blobs in img.find_blobs(thresholds, pixels_threshold=200, area_threshold=200, merge=False):"。
另外,根据引用[3]的内容,你还需要确保你的代码中正确导入了相关的模块。比如,你需要导入tkinter模块,并使用正确的语法来导入Image模块。你可以尝试使用以下代码来导入相关模块:
import tkinter as tk
from tkinter import *
from tkinter import filedialog
try:
from PIL import Image
except ImportError:
import Image
这样,你就可以在代码中正确使用"find_blobs"函数了。
引用[.reference_title]
- 1 2 Attributeerror: ‘module ‘obiect has no attribute ‘find blobs“解决方法[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2
allinsert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - 3 AttributeError: type object ‘Image‘ has no attribute ‘open[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2
allinsert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
相关推荐





