[20568] Failed to execute script 'gen_insights_package' due to unhandled exception!

my code is related to ESP32 rain maker application for home automation.
I have some how scrutinized the issue but I dont know how to solve it.

this error happens to me when ever I try to compile using Rainmaker library and AppInsights library on ESP32 dev kit.

here is the error on the arduino ide 2.2.1 gave me:

Traceback (most recent call last):
  File "gen_insights_package.py", line 56, in <module>
  File "gen_insights_package.py", line 25, in main
  File "os.py", line 213, in makedirs
  File "os.py", line 213, in makedirs
  File "os.py", line 213, in makedirs
  [Previous line repeated 3 more times]
  File "os.py", line 223, in makedirs
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\DRAGON\\BOOSTER'
[20568] Failed to execute script 'gen_insights_package' due to unhandled exception!

the correct directory name is : 'C:\Users\DRAGON BOOSTER'
but the esotool or arduino ide refers to : 'C:\Users\DRAGON\BOOSTER'

how to change that cause it refers the wrong path.

thanks for the upcoming help!

I'm using ESP32 2.0.11 board version.

the problem is with the platform.txt file in the esp32 board installed on arduino IDE.

the platform.txt file was located on
C:\Users<user name>\AppData\Local\Arduino15 (or Arduino)\packages\esp32\hardware\esp32\2.0.11

in my laptop it was Arduino and in my PC it was Arduino15 so kindly check that.

I edited 2 lines from the file and it worked.
I added 2 quotation marks on each line which made the entire text a single string.
these lines are already present in the file, we just need to edit the lines to add quotation marks.
here are the 2 lines I edited

recipe.hooks.objcopy.postobjcopy.1.pattern=bash -c '[ ! -d "{build.path}"/libraries/Insights ] || {tools.gen_insights_pkg.cmd} "{recipe.hooks.objcopy.postobjcopy.1.pattern_args}"'
recipe.hooks.objcopy.postobjcopy.1.pattern.windows=cmd /c if exist "{build.path}\libraries\Insights {tools.gen_insights_pkg.cmd} {recipe.hooks.objcopy.postobjcopy.1.pattern_args}"

hope it works!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.