Discuss Scratch

lyricali
Scratcher
6 posts

Project file failed to load

My browser / operating system: Windows NT 10.0, Chrome 80.0.3987.149, No Flash version detected

Yesterday I made a project in the Scratch 3.0 offline editor. I put in a lot of work, I saved it, and I closed it. When I tried to open it again, I got an error: “The project file that was selected failed to load.” I've gotten this consistently, with this project and no others. I also tried uploading the project to the website, upon which my browser gave me the same error. Can someone tell me what might have happened to my project, and if there's any hope of recovering it (I still have the SB3 file, it's 62 KB)? It's really upsetting to think that I might have lost all of my work from yesterday.
lyricali
Scratcher
6 posts

Project file failed to load

Forgot to mention, I tried to reproduce it by creating another dummy project and saving it, but I was able to open that one just fine.

Here's a screenshot of the error, if that helps at all: https://i.imgur.com/tDeWAfh.png

Last edited by lyricali (March 30, 2020 15:09:24)

OurPrincess
Scratcher
1000+ posts

Project file failed to load

The .json limit is 5MB, and the sound limit is 10MB.
lyricali
Scratcher
6 posts

Project file failed to load

OurPrincess wrote:

The .json limit is 5MB, and the sound limit is 10MB.
Thanks, but the project's JSON size is 138 KB (0.138 MB) when extracted, and there's no sound apart from the default “pop” that I forgot to remove from the stage. I have far more complicated projects than this that open just fine.
minor-edit
Scratcher
500+ posts

Project file failed to load

Anything imported into the project? Are costumes or backdrops drawn in vector or bitmap? Any unusual characters used in scripts? Any unusual lengths or sizes of items? What kind of custom blocks does it have?

Does it open in forkphorus.github.io ?

Or convert to an SB2?

Can you share the file on another website and link to it?
lyricali
Scratcher
6 posts

Project file failed to load

minor-edit wrote:

Anything imported into the project? Are costumes or backdrops drawn in vector or bitmap? Any unusual characters used in scripts? Any unusual lengths or sizes of items? What kind of custom blocks does it have?

Does it open in forkphorus.github.io ?

Or convert to an SB2?

Can you share the file on another website and link to it?
Hi, thanks for the response. The project had some bitmap graphics imported into it; one sprite (a text engine) had 102 bitmap costumes, all 7*9px. Nothing vector except for one plain black backdrop. I don't think it had any unusual characters. Not certain what you mean by “unusual lengths or sizes of items”. There were a couple of sprites with custom blocks that performed fairly complex operations.

It does indeed open in forkphorus. That's good to know about, thank you. Converting to SB2 didn't seem to help, though. I uploaded the SB3 file here: https://gofile.io/?c=jiom91

Just to note, this is no longer a pressing issue for me because I've already remade the project from scratch (ha), but I'd still like to know what's wrong with the file so I can avoid this happening in the future. I've been emptying all the lists every time I save, in case that was causing the problem.

Last edited by lyricali (March 31, 2020 16:44:22)

minor-edit
Scratcher
500+ posts

Project file failed to load

It's the text in the custom say block in the guesser sprite. "\b" is interpreted as backspace, a scratch-parser issue.

{
"opcode": "procedures_call",
"next": null,
"parent": "pIRN9._mBA?Ur)kvkDGg",
"inputs": {
"WLVGUl*e@K*K434.iAz[": [
1,
[
10,
"Minecraft Mob Guessing Game v2.0\\by lyricali\\\\Think of any mob in Minecraft, and I'll ask you a series of yes-no questions to try and figure out what it is!\\\\Click the screen to start once you've chosen a mob."
]
]
},
"fields": {},
"shadow": false,
"topLevel": false,
"mutation": {
"tagName": "mutation",
"children": [],
"proccode": "say %s",
"argumentids": "[\"WLVGUl*e@K*K434.iAz[\"]",
"warp": "false"
}
}

The same string is in a closed monitor for the message variable.

{
"id": "?DWCK3}nZvnzZw7Z(1@q",
"mode": "default",
"opcode": "data_variable",
"params": {
"VARIABLE": "message"
},
"spriteName": null,
"value": "Minecraft Mob Guessing Game v2.0\\by lyricali\\\\Think of any mob in Minecraft, and I'll ask you a series of yes-no questions to try and figure out what it is!\\\\Click the screen to start once you've chosen a mob.",
"width": 0,
"height": 0,
"x": 5,
"y": 32,
"visible": false,
"sliderMin": 0,
"sliderMax": 100,
"isDiscrete": true
}

But not the variable.

{
"isStage": true,
"name": "Stage",
"variables": {
"G(Ep~=^pzIz?|0IylIHb": [
"answer",
"yes"
],
"?DWCK3}nZvnzZw7Z(1@q": [
"message",
"YES! I knew it! Good game! Click the green flag to play again."
],

In Chrome the error in console
gui SyntaxError: Unexpected token y in JSON at position 90232

Fix
unzip .sb3
open project.json in text editor
remove both "\\b" or change both to "\\ b"
save
zip folder
change .zip to .sb3
team lowercase but undercover
pretty json by onlinejsontools / anyone know how to view console errors in the offline editor?

lyricali
Scratcher
6 posts

Project file failed to load

minor-edit wrote:

It's the text in the custom say block in the guesser sprite. "\b" is interpreted as backspace, a scratch-parser issue.



Fix
unzip .sb3
open project.json in text editor
remove both "\\b" or change both to "\\ b"
save
zip folder
change .zip to .sb3
Thank you so much! It worked! I'll keep the \b thing in mind, and I'll consider using a character other than \ to signify line breaks in my text engine.
x-Scratcher-scratch
Scratcher
1 post

Project file failed to load

There are so many errors in Scratch online.

Powered by DjangoBB