chilli-axe / mtg-photoshop-automation

Photoshop scripting to generate high-quality Magic card renders, inserting Scryfall data into Photoshop frame templates.
GNU General Public License v3.0
60 stars 39 forks source link

How I resolved Error 23 and 8800 #6

Closed Infobesity closed 2 years ago

Infobesity commented 4 years ago

At the moment, I can't provide a spoonfeed answer but I did resolve it by editing proxy.jsx in the os search snippet (line 36 ish)

if ($.os.search(/windows/i) != -1) { app.system("echo python \"C:/Users/<USER>/Downloads/Adobe Photoshop CC 2019/Photoshop.20/App/Ps/Presets/Scripts/get_card_info.py\"" + " \"" + cardName + "\"" + " > C:/mtg-autoproxy-master/appsysbyp.bat") $.sleep(250) var bat = new File("C:/mtg-autoproxy-master/appsysbyp.bat"); bat.execute(); } else { // macOS app.system("/usr/local/bin/python3 " + filePath + "/scripts/get_card_info.py \"" + cardName + "\" >> " + filePath + "/scripts/debug.log 2>&1"); }

Yes it's ugly, but basically you use app.system to create a .bat file with correct paths and you use execute to run the get_card_info.py to get a json file

Spent 6 hours to create this hideous mess, hopefully it helps out some others.

3

Infobesity commented 4 years ago

So I went back and pulled a clean version to start from scratch (Windows 10 x64)

Screenshot_19

Same error 23, diagnosed it down to a pathing issue again. Attempting to add file path to resolve: app.system('python ' + filePath + '/scripts/get_card_info.py "' + cardName + '" & pause');

Screenshot_18

Success?!?

image

Nope, ran into another error. Probably unrelated. Was able to create lands without issue, but not creature

Infobesity commented 4 years ago

image Workaround for Error 8800, edit excess functions and throw everything after the TODO into a trycatch (cause I'm lazy). #4

FlorisWarmenhoven commented 4 years ago

Would this work for MacOS?

ndepaola commented 4 years ago

check out #12 for a potential solution to the general photoshop error encountered here