I've used Pyinstaller and cx_freeze to convert a Python code to .exe and with both of them, I get an error when I run the executable. It's a CLI OpenCV program and works properly from source code.
I'm using Windows 10 and the version of Python is 3.6.4. I've tried this in Linux and there it works.
Output:
1. Generate Dataset. (No data has been generated yet.)
2. Exit
3. Enter Camera Address
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\imi_4\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Users\imi_4\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\imi_4\AppData\Local\Programs\Python\Python36\lib\site-packages\keyboard\__init__.py", line 296, in listen
_os_keyboard.listen(self.direct_callback)
File "C:\Users\imi_4\AppData\Local\Programs\Python\Python36\lib\site-packages\keyboard\_winkeyboard.py", line 562, in listen
prepare_intercept(callback)
File "C:\Users\imi_4\AppData\Local\Programs\Python\Python36\lib\site-packages\keyboard\_winkeyboard.py", line 555, in prepare_intercept
keyboard_hook = SetWindowsHookEx(WH_KEYBOARD_LL, keyboard_callback, GetModuleHandleW(NULL), NULL)
ctypes.ArgumentError: argument 3: <class 'OverflowError'>: int too long to convert