Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YOLOv5-6.2: ModuleNotFoundError: No module named 'codeproject_ai_sdk' #263

Open
3 tasks
iVolt1 opened this issue Jan 10, 2025 · 4 comments
Open
3 tasks

Comments

@iVolt1
Copy link

iVolt1 commented Jan 10, 2025

Area of Concern

  • [ X] Server
  • [X ] Installer
  • Server Dashboard or Explorer
  • [X ] Installation issue of one or more Modules. Please post the issue on the module's Issue list directly
  • Behaviour of one or more Modules Please post the issue on the module's Issue list directly
  • Something else

Server Info
Server version: 2.9.5
System: Linux
Operating System: Linux (Debian GNU/Linux )
CPUs: AMD Phenom(tm) II X4 840 Processor (AMD)
1 CPU x 4 cores. 4 logical processors (x64)
GPU (Primary): GP108 [GeForce GT 1030] (rev a1) (NVIDIA Corporation)
System RAM: 6 GiB
Platform: Linux
BuildConfig: Release
Execution Env: Native
Runtime Env: Production
Runtimes installed:
.NET runtime: 9.0.0
.NET SDK: 9.0.101
Default Python: 3.8.20
Go: Not found
NodeJS: Not found
Rust: Not found
Video adapter info:
GP108 [GeForce GT 1030] (rev a1):
Driver Version
Video Processor
System GPU info:
GPU 3D Usage 0%
GPU RAM Usage 0
Global Environment variables:
CPAI_APPROOTPATH =
CPAI_PORT = 32168

Describe the bug

Error messages from below Full log:

08:51:09:ObjectDetectionYOLOv5-6.2:   - Installing the CodeProject.AI SDK... (❌ failed check) done
08:51:10:ObjectDetectionYOLOv5-6.2: Scanning modulesettings for downloadable models...No models specified
08:51:10:ObjectDetectionYOLOv5-6.2: Traceback (most recent call last):
08:51:10:ObjectDetectionYOLOv5-6.2:   File "detect_adapter.py", line 19, in 
08:51:10:ObjectDetectionYOLOv5-6.2:     from codeproject_ai_sdk import JSON, ModuleRunner, LogMethod, LogVerbosity, RequestData
08:51:10:ObjectDetectionYOLOv5-6.2: ModuleNotFoundError: No module named 'codeproject_ai_sdk'
08:51:10:ObjectDetectionYOLOv5-6.2: Self test: Self-test failed

Full log:

Service Url
System 0.83 GB / 0 %
08:50:15:Response timeout. Try increasing the timeout value
08:50:27:Preparing to install module 'ObjectDetectionYOLOv5-6.2'
08:50:27:Downloading module 'ObjectDetectionYOLOv5-6.2'
08:50:27:Installing module 'ObjectDetectionYOLOv5-6.2'
08:50:27:ObjectDetectionYOLOv5-6.2: Setting verbosity to quiet
08:50:27:ObjectDetectionYOLOv5-6.2: (No schemas means: we can't detect if you're in light or dark mode)
08:50:27:ObjectDetectionYOLOv5-6.2:              Installing CodeProject.AI Analysis Module                
08:50:27:ObjectDetectionYOLOv5-6.2: ======================================================================
08:50:27:ObjectDetectionYOLOv5-6.2:                    CodeProject.AI Installer                           
08:50:27:ObjectDetectionYOLOv5-6.2: ======================================================================
08:50:27:ObjectDetectionYOLOv5-6.2: 90.06 GiB of 112.03 GiB available on linux (linux debian x86_64 - linux)
08:50:27:ObjectDetectionYOLOv5-6.2: Installing psmisc...
08:50:32:ObjectDetectionYOLOv5-6.2: Installing xz-utils...
08:50:36:ObjectDetectionYOLOv5-6.2: General CodeProject.AI setup                                          
08:50:36:ObjectDetectionYOLOv5-6.2: Setting permissions on runtimes folder...done
08:50:36:ObjectDetectionYOLOv5-6.2: Setting permissions on general downloads folder...done
08:50:36:ObjectDetectionYOLOv5-6.2: Setting permissions on module asset downloads folder...done
08:50:36:ObjectDetectionYOLOv5-6.2: Setting permissions on modules folder...done
08:50:37:ObjectDetectionYOLOv5-6.2: Setting permissions on models folder...done
08:50:37:ObjectDetectionYOLOv5-6.2: Setting permissions on persisted data folder...done
08:50:37:ObjectDetectionYOLOv5-6.2: GPU support                                                           
08:50:37:ObjectDetectionYOLOv5-6.2: Installing NVIDIA keyring
08:50:39:ObjectDetectionYOLOv5-6.2:   Installing CUDA toolkit
08:50:39:ObjectDetectionYOLOv5-6.2: Found 'deb http://deb.debian.org/debian trixie main'. Replacing it with 'deb http://deb.debian.org/debian trixie main contrib non-free'...
08:50:39:ObjectDetectionYOLOv5-6.2: Found 'deb-src http://deb.debian.org/debian trixie main'. Replacing it with 'deb-src http://deb.debian.org/debian trixie main contrib non-free'...
08:50:44:ObjectDetectionYOLOv5-6.2:  Installing cuda kit
08:50:48:ObjectDetectionYOLOv5-6.2:  CUDA (NVIDIA) Present: Yes (CUDA 12.6, cuDNN 9.6.0)
08:50:48:ObjectDetectionYOLOv5-6.2: ROCm (AMD) Present:    No
08:50:48:ObjectDetectionYOLOv5-6.2: MPS (Apple) Present:   No
08:50:49:ObjectDetectionYOLOv5-6.2: Reading module settings.......done
08:50:49:ObjectDetectionYOLOv5-6.2: Processing module ObjectDetectionYOLOv5-6.2 1.10.0 (Internal)         
08:50:49:ObjectDetectionYOLOv5-6.2: Installing Python 3.8
08:50:49:ObjectDetectionYOLOv5-6.2: Python 3.8 is already installed
08:50:54:ObjectDetectionYOLOv5-6.2: Ensuring PIP in base python install...  done
08:50:55:ObjectDetectionYOLOv5-6.2: Upgrading PIP in base python install... done
08:50:55:ObjectDetectionYOLOv5-6.2: Virtual Environment already present
08:50:55:ObjectDetectionYOLOv5-6.2: Checking for Python 3.8...(Found Python 3.8.20) All good
08:50:55:ObjectDetectionYOLOv5-6.2: Upgrading PIP in virtual environment... done
08:50:56:ObjectDetectionYOLOv5-6.2: Installing updated setuptools in venv... done
08:50:57:ObjectDetectionYOLOv5-6.2: Downloading Standard YOLO models... already exists...Expanding... done.
08:50:57:ObjectDetectionYOLOv5-6.2: Moving contents of models-yolo5-pt.zip to assets...done.
08:51:00:ObjectDetectionYOLOv5-6.2: Downloading Custom YOLO models... already exists...Expanding... done.
08:51:00:ObjectDetectionYOLOv5-6.2: Moving contents of custom-models-yolo5-pt.zip to custom-models...done.
08:51:00:ObjectDetectionYOLOv5-6.2: Installing Python packages for Object Detection (YOLOv5 6.2)
08:51:00:ObjectDetectionYOLOv5-6.2: Installing GPU-enabled libraries: If available
08:51:03:ObjectDetectionYOLOv5-6.2: Searching for python3-pip...All good.
08:51:04:ObjectDetectionYOLOv5-6.2: Ensuring PIP compatibility... done
08:51:04:ObjectDetectionYOLOv5-6.2: Python packages will be specified by requirements.linux.cuda12.txt
08:51:04:ObjectDetectionYOLOv5-6.2:   - Installing Pandas, a data analysis / data manipulation tool... (❌ failed check) done
08:51:05:ObjectDetectionYOLOv5-6.2:   - Installing CoreMLTools, for working with .mlmodel format models... (❌ failed check) done
08:51:05:ObjectDetectionYOLOv5-6.2:   - Installing OpenCV, the Open source Computer Vision library... (❌ failed check) done
08:51:06:ObjectDetectionYOLOv5-6.2:   - Installing Pillow, a Python Image Library... (❌ failed check) done
08:51:06:ObjectDetectionYOLOv5-6.2:   - Installing SciPy, a library for mathematics, science, and engineering... (❌ failed check) done
08:51:07:ObjectDetectionYOLOv5-6.2:   - Installing PyYAML, a library for reading configuration files... (❌ failed check) done
08:51:07:ObjectDetectionYOLOv5-6.2:   - Installing PyTorch, an open source machine learning framework... (❌ failed check) done
08:51:08:ObjectDetectionYOLOv5-6.2:   - Installing TorchVision, for working with computer vision models... (❌ failed check) done
08:51:08:ObjectDetectionYOLOv5-6.2:   - Installing Ultralytics YoloV5 package for object detection in images... (❌ failed check) done
08:51:09:ObjectDetectionYOLOv5-6.2:   - Installing Seaborn, a data visualization library based on matplotlib... (❌ failed check) done
08:51:09:ObjectDetectionYOLOv5-6.2:   - Installing the CodeProject.AI SDK... (❌ failed check) done
08:51:10:ObjectDetectionYOLOv5-6.2: Scanning modulesettings for downloadable models...No models specified
08:51:10:ObjectDetectionYOLOv5-6.2: Traceback (most recent call last):
08:51:10:ObjectDetectionYOLOv5-6.2:   File "detect_adapter.py", line 19, in 
08:51:10:ObjectDetectionYOLOv5-6.2:     from codeproject_ai_sdk import JSON, ModuleRunner, LogMethod, LogVerbosity, RequestData
08:51:10:ObjectDetectionYOLOv5-6.2: ModuleNotFoundError: No module named 'codeproject_ai_sdk'
08:51:10:ObjectDetectionYOLOv5-6.2: Self test: Self-test failed
08:51:10:ObjectDetectionYOLOv5-6.2: Module setup time 00:00:21
08:51:10:ObjectDetectionYOLOv5-6.2: Install failed: Self-test failed
08:51:10:ObjectDetectionYOLOv5-6.2:                 Setup complete                                        
08:51:10:ObjectDetectionYOLOv5-6.2: Total setup time 00:00:43
08:51:10:ObjectDetectionYOLOv5-6.2: SETUP FAILED:
08:51:10:ObjectDetectionYOLOv5-6.2:  - [Int: ObjectDetectionYOLOv5-6.2] Self-test failed
08:51:10:Module ObjectDetectionYOLOv5-6.2 installed successfully.
08:51:10:Installer exited with code 1
08:51:10:
08:51:10:Module 'Object Detection (YOLOv5 6.2)' 1.10.0 (ID: ObjectDetectionYOLOv5-6.2)
08:51:10:Valid:            True
08:51:10:Module Path:      <root>/modules/ObjectDetectionYOLOv5-6.2
08:51:10:Module Location:  Internal
08:51:10:AutoStart:        True
08:51:10:Queue:            objectdetection_queue
08:51:10:Runtime:          python3.8
08:51:10:Runtime Location: Shared
08:51:10:FilePath:         detect_adapter.py
08:51:10:Start pause:      1 sec
08:51:10:Parallelism:      0
08:51:10:LogVerbosity:
08:51:10:Platforms:        all,!raspberrypi,!jetson
08:51:10:GPU Libraries:    installed if available
08:51:10:GPU:              use if supported
08:51:10:Accelerator:
08:51:10:Half Precision:   enable
08:51:10:Environment Variables
08:51:10:APPDIR             = <root>/modules/ObjectDetectionYOLOv5-6.2
08:51:10:CUSTOM_MODELS_DIR  = <root>/modules/ObjectDetectionYOLOv5-6.2/custom-models
08:51:10:MODELS_DIR         = <root>/modules/ObjectDetectionYOLOv5-6.2/assets
08:51:10:MODEL_SIZE         = Medium
08:51:10:USE_CUDA           = True
08:51:10:YOLOv5_AUTOINSTALL = false
08:51:10:YOLOv5_VERBOSE     = false
08:51:10:
08:51:10:Error trying to start Object Detection (YOLOv5 6.2) (detect_adapter.py)
08:51:10:Module ObjectDetectionYOLOv5-6.2 started successfully.
08:51:10:Error is: An error occurred trying to start process '/usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3' with working directory '/usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2'. No such file or directory
08:51:10:   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at CodeProject.AI.Server.Modules.ModuleProcessServices.StartProcess(ModuleConfig module, String installSummary)
08:51:10:Please check the CodeProject.AI installation completed successfully

Expected behavior
Module will install

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Other modules had the same issue.

Thanks for looking at this.

@JonTabor
Copy link

JonTabor commented Jan 16, 2025

I have this same issue after upgrading to 2.9.5. I think the issue is that this path is wrong:

Error is: An error occurred trying to start process '/usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3' with working directory '/usr/bin/codeproject.ai-server-2.9.5/modules/ObjectDetectionYOLOv5-6.2'. No such file or directory

I was able to get around this issue by manually created this directory:
usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu

Then inside that directory, creating a symlink called "linux" to the debian directory one level higher, and now the module runs.

@iVolt1
Copy link
Author

iVolt1 commented Jan 16, 2025

Thanks for tip, Jon. I don't create symlinks often, so could you please provide the entire command and where to run it from?

Thanks.

@JonTabor
Copy link

JonTabor commented Jan 16, 2025

Absolutely. Here's the whole process:

cd /usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian
mkdir "debian gnu"
cd "debian gnu"
ln -s ../debian linux

Note that some modules use a different path (usually /usr/bin/codeproject.ai-server-2.9.5/modules/MODULE NAME/bin/debian), so depending on what module you install, you may have to do this in the module directory instead of the runtimes directory.

Hope that helps!

@danistst
Copy link

danistst commented Jan 31, 2025

I probably have the same problem. But I can't get it to work .

Error Error trying to start Face Processing (intelligencelayer/face.py)
Error Error is: An error occurred trying to start process '/usr/bin/codeproject.ai-server-2.9.5/runtimes/bin/debian gnu/linux/python38/venv/bin/python3' with working directory '/usr/bin/codeproject.ai-server-2.9.5/modules/FaceProcessing'. No such file or directory
Error at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at CodeProject.AI.Server.Modules.ModuleProcessServices.StartProcess(ModuleConfig module, String installSummary)
Error *** Please check the CodeProject.AI installation completed successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants