Copy link to clipboard
Copied
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 !
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.
Copy link to clipboard
Copied
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
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
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!