aeon0 / botty

D2R Pixel Bot
MIT License
532 stars 377 forks source link

Missing module cv2 when starting main exe #756

Open butcherBubby opened 2 years ago

butcherBubby commented 2 years ago

Is it really a Bug report? If you have questions regarding setup or feature information/requests, please consider asking in the Discord channel: https://discord.gg/Jf3J8cuXWg. The Github issues section is for bug reports only.

Botty Version v0.7.3 bae1f02

Describe the bug Starting the main.exe runs into error: ImportError: DLL load failed while importing cv2: The specified module...

To Reproduce Steps to reproduce the behavior:

  1. Extract botty_v.0.7.3.rar
  2. Click on main.exe

Expected behavior A clear and concise description of what you expected to happen.

Screenshots / Video Screenshot

Logs N/A

Additional info OS: Win 10 x64


Python 3.10.1
MartinB134 commented 2 years ago

Solution:

  1. Install Windows Redist: VC redist-official_download
  2. Install Feature Media Pack (Win Search "Optional Features">Add Optional Feature>Search for Feature Media pack) image
  3. You must reboot

Explanation: In essence on the import of the cv2 module a dll is missing a dependency, which can be anything. I think most ppl will face this issue working with VMs. It doesn't matter if you use the exe or the development approach. The only difference is that the main.exe from the prepackage just closes, without any chance to view the error/stacktrace. Since 2016 many problems have occurred, from python and anaconda version collisions, to just folder misplacements or missing python3.dll in conda etc. It is madness to StackOverflow this issue.

So above steps is what helped for me with python 3.9 and miniconda 4.x on a fresh Win11 Hyper V/ Parsec venv. Hope that helps anybody :)