Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错:AttributeError: 'DdddOcr' object has no attribute 'set_ranges' #225

Open
abc123info opened this issue Aug 25, 2024 · 1 comment

Comments

@abc123info
Copy link

您好,感谢提供这么好的作品,就是有一段代码报错
AttributeError: 'DdddOcr' object has no attribute 'set_ranges',怎么解决呢

image = open("c:\test.jpg", "rb").read()
ocr.set_ranges(0)
result = ocr.classification(image, probability=True)
s = ""
for i in result['probability']:
s += result['charsets'][i.index(max(i))]

print(s)

@abc123info abc123info changed the title AttributeError: 'DdddOcr' object has no attribute 'set_ranges' 报错:AttributeError: 'DdddOcr' object has no attribute 'set_ranges' Aug 25, 2024
@lotomer
Copy link

lotomer commented Oct 18, 2024

本地的版本太旧了,删除后重新安装

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants