devmaxxing / videocr-PaddleOCR

Extract hardcoded subtitles from videos using machine learning
MIT License
142 stars 22 forks source link

Deprecation Warning #6

Closed Soebb closed 2 years ago

Soebb commented 2 years ago

It looks like some methods used in some of the dependencies is deprecated! IMG_20220101_215553_604

Also it gave an paddleocr/paddlepaddle error as of the last one.

Python 3.7 (64Bit) paddleocr 2.3.0.2 paddlepaddle 2.2.1

Edit: i found the reason of raising deprecation warnings. it happened because fasttext and python-levenshtein couldnt be installed with pip in my case, so install those with pipwin. and reinstall videocr with adding --ignore-installed [package] to the pip command, for ignore installing those 2 packages. Also if raised an error while installing paddleocr dependencies(fastext one), so install paddleocr(with ignore installing fastext), then reinstall videocr(with ignore installing paddleocr) and finally check again that you installed fasttext by pipwin.

devmaxxing commented 2 years ago

Hello, I'm not sure I can do anything in this repo if there is an issue with PaddleOCR. What PaddleOCR version are you using?

Soebb commented 2 years ago

Okay. paddleocr 2.3.0.2

devmaxxing commented 2 years ago

Does paddleocr 2.3.0.1 also have this issue?

Soebb commented 2 years ago

c:\ocr-bot>python37 main.py C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy_distributor_init.py:32: UserWarning: loaded more than 1 DLL from .libs: C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy.libs\libopenblas.QVLO2T66WEPI7JZ63PS3HMOHFEY472BC.gfortran-win_amd64.dll C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy.libs\libopenblas.XWYDX2IKJW2NMTWSFYNGFUWKQU3LYTCZ.gfortran-win_amd64.dll stacklevel=1) Traceback (most recent call last): File "main.py", line 1, in from videocr import save_subtitles_to_file File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\videocr__init.py", line 2, in from .api import get_subtitles, save_subtitles_to_file File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\videocr\api.py", line 1, in from .video import Video File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\videocr\video.py", line 9, in from paddleocr import PaddleOCR File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddleocr\init.py", line 15, in from .paddleocr import * File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddleocr\paddleocr.py", line 26, in from tools.infer import predict_system File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddleocr\tools\infer\predict_system.py", line 30, in import tools.infer.utility as utility File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddleocr\tools\infer\utility.py", line 23, in from paddle import inference File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\init.py", line 59, in import paddle.dataset # noqa: F401 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\dataset\init.py", line 27, in import paddle.dataset.flowers # noqa: F401 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\dataset\flowers.py", line 39, in from paddle.dataset.image import load_image_bytes File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\dataset\image.py", line 51, in stderr=subprocess.PIPE) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 756, in init__ restore_signals, start_new_session) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1155, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

Same error, Just this time, a bit different.

it seems running the script on windows give little chance to be workable.

Hope you create its app asap, Anyway thanks for your work.

devmaxxing commented 2 years ago

Hmmm it seems like it might be PaddlePaddle that's giving this error? What version of PaddlePaddle are you using? For reference, I'm running the program fine on Windows. I'm using paddlepaddle 2.2.0 with paddleocr 2.3.0.1.

Soebb commented 2 years ago

Thanks it fixed properly and program is running, yes it was because of paddlepaddle (paddlepaddle 2.2.0 no but paddlepaddle 2.1.3 helped)

Note: by paddlepaddle 2.1.3 installed, an scipy error might be raised when run script, it can be fixed by installing setuptools<60.0 and reinstall scipy.