IBM / taxinomitis

Source code for Machine Learning for Kids site
https://machinelearningforkids.co.uk
Apache License 2.0
144 stars 137 forks source link

Bug: MQTT block can't load saved project #480

Closed Lewiscowles1986 closed 7 months ago

Lewiscowles1986 commented 1 year ago

Please find attached two saved scratch workspaces using the music and MQTT snippets

Archive 2.zip

This is really cool. I Just think maybe the kids will want to be able to save and load the projects as well.

image

dalelane commented 1 year ago

Sorry about this

I can see that the zip contains two Scratch files - both with the MQTT blocks, and one of them loads fine and the other doesn't.

Can you give me any clues about what differs between the two Scratch projects? Did you create them differently? Can you think of anything that you did differently between them that might explain why one loads and the other doesn't?

Lewiscowles1986 commented 1 year ago

Does one of them load for you? Neither load for me. I had just created the second as a test.

dalelane commented 1 year ago

https://github.com/IBM/taxinomitis/assets/1444788/6cde70d7-0bb7-4810-9fb9-a02c9501fe50

Lewiscowles1986 commented 1 year ago

Oh, how weird, it did load the second time. I might have to break out a debugger on this. Maybe an exception escapes and can tell me what is wrong. Thanks, and sorry for using your time to show me that. I was unaware one loaded. It didn't this AM, but then maybe I loaded the wrong file...

Lewiscowles1986 commented 1 year ago
Traceback ``` gui { "validationError":"Could not parse as a valid SB2 or SB3 project.", "sb2Errors":[ {"keyword":"required","dataPath":"","schemaPath":"#/required","params": {"missingProperty":"objName"},"message":"should have required property 'objName'"} ], "sb3Errors":[ {"keyword":"type","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf/0/type","params":{"type":"string"},"message":"should be string"}, {"keyword":"type","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf/1/type","params":{"type":"number"},"message":"should be number"}, {"keyword":"oneOf","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf","params":{"passingSchemas":null},"message":"should match exactly one schema in oneOf"}, {"keyword":"type","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/oneOf/1/type","params":{"type":"boolean"},"message":"should be boolean"}, {"keyword":"oneOf","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/oneOf","params":{"passingSchemas":null},"message":"should match exactly one schema in oneOf"} ] } ```

So it is a schema validation error. Hmm.

dalelane commented 7 months ago

I can't recreate this and am fairly sure that load/save is working correctly so I'm closing this