Skip to main content
KWata.13
Associate
January 6, 2019
Question

Invalid Network Error in loading model and unable to check AI Application.

  • January 6, 2019
  • 5 replies
  • 6898 views

I tried Cube AI like youtube https://youtu.be/grgNXdkmzzQ. But I got some difficulties.

I use Cube MX 5.0.1,Cube AI 3.3.0.

1.   Invalid Network Error

In mcu selection, I selected Github Model file and pushed analyze button in the funtion item. Then I got Invalid network error and difficult to analyze the model.

In the youtube, here : https://youtu.be/grgNXdkmzzQ?t=217

2.   Unable check AI in the Pinout & Configuration Setting

I selected F7 MCU. But the item of Artificial intelligence doesn’t appear in the Application software. I tried to display the item by checking AI in the additional software. But the item doesn’t appear in the Application.

In the youtube, here : https://youtu.be/grgNXdkmzzQ?t=316

Anyone has solutions?

Thank you.

This topic has been closed for replies.

5 replies

Romain LE DONGE
Associate
January 7, 2019

Hi,

Could you provide us the complete output log and the CubeMX log while reproducing the error ?

(CubeMX log is located at: C:\Users\[username]\.stm32cubemx\STM32CubeMX.log)

Thank you

Jonathan Roberts
Associate II
January 7, 2019

I get the same error when I try and analyse the HAR-CNN-Keras Model from Github: This is the relevant snippet from the STM32CubeMX.Log file:

2019-01-07 16:23:57,845 [INFO] McuExtendedFiltersManager:82 - Reset MCU extended filter: Artificial Intelligence
2019-01-07 16:24:12,555 [ERROR] AIPython:88 - Error: no directory found: C:/Users/another/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows
2019-01-07 16:24:12,555 [INFO] AIPython:100 - Command: C:/Users/another/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows/generatecode --auto -c C:/Users/another/AppData/Local/Temp/mxAI11374476597176510148740718862498/config.ai
2019-01-07 16:24:12,565 [INFO] AIPython:153 - Exception in python generation: java.io.IOException: Cannot run program "C:/Users/another/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows/generatecode" (in directory "C:\Users\another\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\3.3.0\Utilities\windows"): CreateProcess error=2, The system cannot find the file specified

The console in STM32CubeMX shows:

Command: Command: C:/Users/another/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows/generatecode --auto -c C:/Users/another/AppData/Local/Temp/mxAI11374476597176510148740718862498/config.ai
 Invalid network

The following path has no files or directories present:

C:\Users\another\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\3.3.0

The parent directory includes the 3.3.0 folder and what looks like an extraction of the the install pack in a TMPUPD folder.

Hope this figures out what the problem is..

Jonathan

Jonathan Roberts
Associate II
January 7, 2019

Copying the contents of :

C:\Users\another\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\TMPUPD_7987620512652994028\Utilities

To:

C:\Users\te192188\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\3.3.0\Utilities

Seems to resolve the problem running analyse. It looks like the installer hasn't worked correctly.

Romain LE DONGE
Associate
January 8, 2019

There are effectively problems during the installation, try deleting X-Cube-AI from CubeMX, then go to "C:\Users\[username]\STM32Cube\Repository\Packs\STMicroelectronics" and check that X-Cube-AI is no more present (delete it if present). Be sure that no process is using the directory and try re-installing the X-Cube-AI from CubeMX

Additionally what you can try is a manual installation by downloading the plugin here (bottom of the page) : https://www.st.com/en/embedded-software/x-cube-ai.html

Then go to Help > Embedded Software Packages Manager and click on "From Local" to browse the file you just get

Hope this can help

KWata.13
KWata.13Author
Associate
January 8, 2019

Thank you.

​CubeMX log is here.

2019-01-07 22:29:32,388 [ERROR] AIPython:88 - Error: no directory found: C:/Users/***/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows
 
2019-01-07 22:29:32,407 [INFO] AIPython:100 - Command: C:/Users/***/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows/generatecode --auto -c C:/Users/***/AppData/Local/Temp/mxAI21338039797414705533947946921371644/config.ai
 
2019-01-07 22:29:32,431 [INFO] AIPython:153 - Exception in python generation: java.io.IOException: Cannot run program "C:/Users/***/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/3.3.0/Utilities/windows/generatecode" (in directory "C:\Users\***\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\3.3.0\Utilities\windows"): CreateProcess error=2, cannot find files.
 
2019-01-07 22:29:32,663 [INFO] New_gui_TipPanel:170 - scale :0.21235194585448391
 
2019-01-07 22:29:36,157 [INFO] ApiDb:186 - Save user favorites file C:\Users\***/.stm32cubemx/favorites.mcus.txt: 0 item(s)
 
2019-01-07 22:29:36,159 [INFO] ApiDb:191 - User favorites MCUs=[]
 
2019-01-07 22:29:36,165 [INFO] ApiDb:186 - Save user favorites file C:\Users\***/.stm32cubemx/favorites.boards.txt: 0 item(s)
 
2019-01-07 22:29:36,166 [INFO] ApiDb:191 - User favorites Boards=[]

From the log, the probrem may be the instalation fail of the ai pack.

The dedicated folder doesn't exit and I reinstalled it again.

But​ I got the error again.

Finally, I succeeded the execution.

The solution is deleting X-Cube-AI folder completely and reinstalling it again.

Thank you.

KKhos.184
Visitor II
October 17, 2019

Hi everyone, i am having a similar issue , i get a invalid network error window once i start to analyze. Please find below the log:

2019-10-17 17:35:39,958 [INFO] AIPython:126 - Command used: C:/Users/Preeti/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.4.0/Utilities/windows/generatecode --auto -c C:/Users/Preeti/AppData/Local/Temp/mxAI117732111163906505095478914033096/config.ai

2019-10-17 17:35:39,974 [INFO] AIPython:196 - Exception in python generation: java.io.IOException: Cannot run program "C:/Users/Preeti/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/3.4.0/Utilities/windows/generatecode" (in directory "C:\Users\Preeti\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\3.4.0\Utilities\windows"): CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher

BHuan.3
Associate
July 8, 2022

@Romain LE DONGE​ 

Hi, Thanks for your attention. I try to reinstall the stm32cubeMX but it doesn't help. I am analyzing the .onnx format model.

0693W00000QKl99QAD.pngHere is the log information. Can you help me with this problem?

2022-07-08 15:39:51,314 [INFO] BoardInfo:879 - No configuration file found for board P-NUCLEO-WB55
2022-07-08 15:39:51,316 [INFO] DbBoards:156 - Kit is not supported: P-NUCLEO-WB55
2022-07-08 15:39:51,319 [INFO] BoardInfo:879 - No configuration file found for board STEVAL-BFA001V1B
2022-07-08 15:39:51,320 [INFO] DbBoards:156 - Kit is not supported: STEVAL-BFA001V1B
2022-07-08 15:39:51,321 [INFO] BoardInfo:879 - No configuration file found for board STEVAL-BFA001V2B
2022-07-08 15:39:51,321 [INFO] DbBoards:156 - Kit is not supported: STEVAL-BFA001V2B
2022-07-08 15:39:51,404 [INFO] DbBoards:160 - Found 176 boards, 173 are supported
2022-07-08 15:39:51,408 [INFO] ApiDb:418 - Load user favorites file /Users/name/.stm32cubemx/favorites.boards.txt: 0 item(s)
2022-07-08 15:39:51,408 [INFO] ApiDb:422 - User favorites Boards=[]
2022-07-08 15:39:51,409 [INFO] DbBoards:189 - Set 0 / 0 favorites Boards
2022-07-08 15:39:56,930 [INFO] ExtendedFilter:65 - Artificial Intelligence: enable filter
2022-07-08 15:39:56,938 [INFO] McuExtendedFiltersManager:86 - Reset MCU extended filter: Artificial Intelligence
2022-07-08 15:40:11,418 [INFO] AInterface:235 - ModelName:network; files:[/Users/name/STM32Cube/test.onnx]; type:ONNX; compression:None
2022-07-08 15:40:11,434 [INFO] AInterface:515 - workspaceTempDir: /var/folders/y8/7c4vvzbj2l1dw7trnz05b52m0000gn/T/mxAI_workspace5038345178307913369027895421033696
2022-07-08 15:40:11,438 [INFO] AInterface:1065 - Setting Env: /Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac
2022-07-08 15:40:11,440 [INFO] AInterface:1122 - Custom PATH variable: /Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac:/bin:/usr/bin:/usr/sbin:/sbin:/Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac/node/bin
2022-07-08 15:40:11,500 [INFO] CmdLine:100 - Command: /Users/name/STM32Cube/Repository//Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/mac/stm32ai analyze --name network -m /Users/name/STM32Cube/test.onnx --type onnx --compression none --verbosity 1 --workspace /var/folders/y8/7c4vvzbj2l1dw7trnz05b52m0000gn/T/mxAI_workspace5038345178307913369027895421033696 --output /Users/name/.stm32cubemx/network_output --allocate-outputs
2022-07-08 15:40:12,022 [INFO] CmdLine:132 - stm32ai exit with status: 132
2022-07-08 15:40:12,025 [ERROR] CmdLine:135 - stm32ai return with an error