238Views2Replies

Author Options:

JSON parse exception prevents editing or deleting of instructable Answered


Try creating an instructable with the text below in the description. When you save it, a JSON parse error pops up. The same exception will pop up each time you go to edit the instructable, preventing you from reaching the edit page or ever deleting it. You apparently need to sanitize your input a bit more.


SET count=0
setlocal ENABLEDELAYEDEXPANSION
FOR /f %%a IN ('dir /b *.jpg') DO (
set /a xOffset = !count!*2
set /a xSize = 1098+!count!*6
set /a yOffset = !count!*1
set /a ySize = 732+!count!*4
"C:\Program Files\ImageMagick-6.7.3-Q16\convert.exe" %%a[!xSize!x!ySize!+!xOffset!x+!yOffset!] pan-%%a
set /a count=count+1
)


The exact exception is: "There's been a problem updating your Instructable
[object Object]
parsererror
SyntaxError: JSON.parse: bad escaped character"

2 Replies

user
StumpChunkman (author)2011-11-06

Thank you! Passing this on to people who might be able to read what that says.

May I ask what that code means and why you're putting it into the instructable?

Thanks!

Select as Best AnswerUndo Best Answer

user
Fremonster (author)StumpChunkman2011-11-06

Sure. I was giving an example of how to write a script that batch edits photos for this instructable: https://www.instructables.com/id/Pan-Zoom-time-lapse-photography-on-the-cheap/

To work around the problem, I've attached the script to the instructable as a txt file instead.

Select as Best AnswerUndo Best Answer