• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ignore this file not found error dialog in illustrator

Engaged ,
Jul 05, 2023 Jul 05, 2023

Copy link to clipboard

Copied

KarthikSG_0-1688624606736.png

 

I am getting this error while running a script via Python tool but if i click ok the tool is working fine but i didn't know the source of this error in tool unable to figure it out both in illustrator or python tool. So I ish to ignore this error but this error is arriving before opening the illus javascript tool. So Suggest a way to ignore this error or tell why this error is popping up even when the tool path were correct and perfectly working fine !

TOPICS
How-to , Import and export , Scripting , SDK

Views

272

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jul 06, 2023 Jul 06, 2023

Copy link to clipboard

Copied

Your script cannot find a file. You might want to put the file into a place where your script can find it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 06, 2023 Jul 06, 2023

Copy link to clipboard

Copied

LATEST

Yes I placed the file in accessible location and then also it is alerting me and if I click Ok on that alert it runs the script in that location perfectly. So only i asked a way to ignore this alert popup Dialog

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 06, 2023 Jul 06, 2023

Copy link to clipboard

Copied

Hi @Karthik SG, first you must find out which line of code is throwing the error. Try adding a "debugger" call here or there in the code and this way you can easily see if the error message appears before or after the debugger breaks. Judicious placement of the debugger call and trial and error will work in almost all cases. In a case where you have included frameworks sometimes the error will be in one of those.

 

Once you find the error location, if you still don't understand, at least you can post the code snippet that is throwing the error. 

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 06, 2023 Jul 06, 2023

Copy link to clipboard

Copied

import subprocess
illustrator_path = "C:/Program Files/Adobe/Adobe Illustrator 2022/Support Files/Contents/Windows/Illustrator.exe"  # Update with the correct path to your Illustrator executable
javascript_file = "/d/A.jsx" # Update with the correct path to your JavaScript file
subprocess.run([illustrator_path, "/run", javascript_file])

 

When I run this .py script, it throws the same error "File not found" But I have the file in the location and script is only alerting file is not found found but when i click ok scripting is running! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines