The story of an error in PyOCR

Isn't tesseract a "tesseract"? Here Please read and understand. Jupyter is Jupyter and Tensorflow is TensorFlow. As a former English teacher, I can't give up here.

Details of the error

I was scolded that the argument -psm was useless.

File "C:\Users\hogehoge\Anaconda3\envs\pyocr\lib\site-packages\pyocr\tesseract.py", line 362, in image_to_string

raise TesseractError(status, errors)

pyocr.error.TesseractError: (1, b"Error, unknown command line argument '-psm'\r\n")

What I fixed

The argument -psm is useless, but --psm seems to be OK. Hey.

C:\Users\hoge\Anaconda3\envs\pyocr\Lib\site-packages\pyocr\lib\site-packages\pyocr\

tesseract.py


command = [TESSERACT_CMD, "input.bmp", 'stdout', "--psm", "0"]

C:\Users\hoge\Anaconda3\envs\pyocr\Lib\site-packages\pyocr\

builders.py


tess_flags = ["--psm", str(tesseract_layout)]

[Page here](https://webcache.googleusercontent.com/search?q=cache:hIKucCh4UZoJ: https://madomadox.hatenablog.com/entry/2018/06/24/165317+&cd=1&hl=ja&ct= I referred to clnk & gl = jp & client = firefox-be), but it's Google's cache, isn't it?

If you look at the entire blog, there are only hack articles, so is it your intention to unify the categories?

(No, it seems that this problem has been solved, but the problem that I want to solve using the original OCR has not been solved ...)

Recommended Posts

The story of an error in PyOCR
The story of participating in AtCoder
The story of the "hole" in the file
The story of making Python an exe
The story of making an immutable mold
The story of sys.path.append ()
The story of finding the optimal n in N fist
The story of reading HSPICE data in Python
The story of viewing media files in Django
The story of building Zabbix 4.4
[Apache] The story of prefork
The story of building the fastest Linux environment in the world
The story of FileNotFound in Python open () mode ='w'
[Golang] Specify an array in the value of map
Examine the margin of error in the number of deaths from pneumonia
The story of downgrading the version of tensorflow in the demo of Mask R-CNN.
The story of Python and the story of NaN
Get the attributes of an object
An error occurred in scikit-learn imputer
The meaning of ".object" in Django
The story of remounting the application server
The story of writing a program
VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
How to intentionally issue an error in the shell During testing
How to know the internal structure of an object in Python
The story of outputting the planetarium master in pdf format with Pycairo
[Pythonista] The story of making an action to copy selected text
How to get rid of the "Tags must be an array of hashes." Error in the qiita api
The story of trying to reconnect the client
[Understanding in 3 minutes] The beginning of Linux
Check the behavior of destructor in Python
The story of verifying the open data of COVID-19
The story of adding MeCab to ubuntu 16.04
It's an implementation of ConnectionPool in redis.py
Implement part of the process in C ++
What is the cause of the following error?
[Python] Understand the content of error messages
Resolve the Address already in use error
The result of installing python in Anaconda
Let's claim the possibility of pyenv-virtualenv in 2021
The story of manipulating python global variables
The basics of running NoxPlayer in Python
The story of trying deep3d and losing
The story of deciphering Keras' LSTM model.predict
In search of the fastest FizzBuzz in Python
The story of blackjack A processing (python)
The story of pep8 changing to pycodestyle
Install the package in an offline environment
The story of a Parking Sensor in 10 minutes with GrovePi + Starter Kit
Is_alive () gives an error instead of False after threading process in Python3
Comparing the basic grammar of Python and Go in an easy-to-understand manner
Open an Excel file in Python and color the map of Japan
The story of the escape probability of a random walk on an integer grid
I want to leave an arbitrary command in the command history of Shell
An example of the answer to the reference question of the study session. In python.
[Question] In sk-learn random forest regression, an error occurs when the number of parallels is set to -1.
Output the number of CPU cores in Python
The story of doing deep learning with TPU
The meaning of {version-number} in the mysql rpm package
[Python] I want to know the variables in the function when an error occurs!
[Python] Sort the list of pathlib.Path in natural sort