2

I am trying to extract text from an image using Google-Cloud_vision API. The python file runs well but I get the following error when I use pyinstaller to convert the python file to .exe file.

ssl_roots_override_callback eror I have tried solving this issue based on the following links, but I still am getting the same error.

https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OpenSSL-Certificate Twilio Python Module Errors After Compiling

I tried the following: 1. Added the path to roots.pem, cert.pem in the datas argument of the .spec file 2. added hooks-requests.py file to hooks folder of pyinstaller

a = Analysis(['getTextFromImage.py'],
         pathex=['\\FileDirectory'],
         binaries=[],
         datas=[('FileDirectory\\cert.pem', '.'), ('FileDirectory\\roots.pem', '.') ],
         hiddenimports=[],
         hookspath=[],
         runtime_hooks=[],
         excludes=[],
         win_no_prefer_redirects=False,
         win_private_assemblies=False,
         cipher=block_cipher,
         noarchive=False)


from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files('requests')
Naruto137
  • 94
  • 5

0 Answers0