Trying out CodeProject.AI and getting "ModuleNotFoundError: No module named 'codeproject_ai_sdk'" when starting up

Deadeye

Young grasshopper
Oct 14, 2018
79
12
Canada
So I was following one of the CodeProject.AI tutorials as everyone was saying that the AI detection is way better, I thought I would try it out. I installed CodeProject.AI on my Windows 11 system (brand new, fresh OS install) and when it starts up, I'm getting this in the log:

22:37:29:Started Face Processing module
22:37:29:face.py: Traceback (most recent call last):
22:37:29:face.py: File "C:\Program Files\CodeProject\AI\modules\FaceProcessing\intelligencelayer\face.py", line 19, in
22:37:29:face.py: from codeproject_ai_sdk import RequestData, ModuleRunner, LogMethod, JSON
22:37:29:face.py: ModuleNotFoundError: No module named 'codeproject_ai_sdk'
22:37:29:Module FaceProcessing has shutdown
22:37:29:face.py: has exited

I tried searching for a solution and I couldn't find much. Some said that it was due to different python versions, but I unistalled everything, cleared any python entries in my PATH (there were none after uninstalling) and tried again. Still getting the same error. I can't figure it out. The odd thing is that at the bottom, it says that face processing is running, when it's obviously not (judging by these logs).


Has anyone else run into this and found a way to fix it?
 
Ok, I found a fix and I'm posting it here for anyone else (running codeproject.ai on Windows) who runs into this issue. This fixed it for me:

  • Close the CodeProject.AI Server (or stop the service in services.msc).
  • Open Command Prompt as an Administrator.
  • Navigate to the Face Processing module directory: DOS
    • cd "C:\Program Files\CodeProject\AI\modules\FaceProcessing"
  • Run the setup script by pointing back to the main setup utility:
    • ..\..\setup.bat
  • Note: This command tells the system to run the main installer logic but specifically for the folder you are currently in. Watch the logs—it should say "Installing Python packages for Face Processing."
 
  • Like
Reactions: looney2ns
Ugh, now I'm getting the following error when starting up the license plate module:
16:02:41:Started License Plate Reader module
16:02:41:Installer exited with code 0
16:02:42:ALPR_adapter.py: INFO: Could not find files for the given pattern(s).
16:02:42:ALPR_adapter.py: C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:712: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: 16:02:42:ALPR_adapter.py: warnings.warn(warning_message)
16:02:44:Module ALPR started successfully.


I just can't win with this thing.
 
Ugh, now I'm getting the following error when starting up the license plate module:
16:02:41:Started License Plate Reader module
16:02:41:Installer exited with code 0
16:02:42:ALPR_adapter.py: INFO: Could not find files for the given pattern(s).
16:02:42:ALPR_adapter.py: C:\Program Files\CodeProject\AI\modules\ALPR\bin\windows\python39\venv\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:712: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: 16:02:42:ALPR_adapter.py: warnings.warn(warning_message)
16:02:44:Module ALPR started successfully.


I just can't win with this thing.
I recommend using Blue Iris AI, it now has built in AI with ALPR.