jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.52k stars 748 forks source link

Projects saved on 12/14 will open on 12/15, but cannot be saved/exported #1065

Closed CameronParker closed 6 years ago

CameronParker commented 8 years ago

I have 60 students working on projects currently. Any project work that they saved yesterday will open today, but cannot be re-saved to the cloud, browser, or exported. Saving to the cloud shows an endless saving message (can cancel, but save doesn't happen). Saving to the browser or exporting xml results in: Type error: Cannot read property "length" of undefined

Worried that all existing project work will need to be recreated, and that we can't make any (saveable) progress until this issue is fixed.

thanks Cameron

jmoenig commented 8 years ago

Please reload Snap and reload those projects, then saving should be fine. I've just patched Snap with a fix that lets you save every project directly to disk. Note that in the "about" dialog it should say "v4.0.4". Flushing the cache (or just re-loading Snap, so it is current) will also take care of the other problem (cloning) you've reported.

CameronParker commented 8 years ago

Thanks Jens – had the students quit the browser (Chrome), restart, reload Snap, verify version as 4.04. Still seeing both issues though. Different student (new class hour) is also running into issues (Snap freezes) - he has the Tools library imported and is using catch (tag) and throw (catchtag) which are causing the freeze. In a new project, these blocks turn red on the left palette when you attempt to click/drag them to the code canvas.

If you need account/project details let me know.

As FYI about a cool use of Snap: We’re using Xbox Kinects with fully Kinect controlled games. I had a former student write a translation library using Python that creates a mini web server (running on same machine in the background) that responds to URL requests with Kinect skeleton data (uses pykinect library and Kinect SDK). We then use split to parse the data into lists and variables, getting ~15-20 fps of skeleton data. Was previously using Scratch with Kinect2Scratch utility, but shifted this over to Snap last year using the web server approach.

From: Jens Mönig [mailto:notifications@github.com] Sent: Tuesday, December 15, 2015 12:01 PM To: jmoenig/Snap--Build-Your-Own-Blocks Cc: Parker, Cameron SHS - Staff Subject: Re: [Snap--Build-Your-Own-Blocks] Projects saved on 12/14 will open on 12/15, but cannot be saved/exported (#1065)

Please reload Snap and reload those projects, then saving should be fine. I've just patched Snap with a fix that lets you save every project directly to disk. Note that in the "about" dialog it should say "v4.0.4". Flushing the case (or just re-loading Snap, so it is current) will also take care of the other problem (cloning) you've reported.

— Reply to this email directly or view it on GitHubhttps://github.com/jmoenig/Snap--Build-Your-Own-Blocks/issues/1065#issuecomment-164878181.

brianharvey commented 8 years ago

I can't reproduce the turning-red part, but I confirm that catch/throw are broken: catch This does both the SAY and the THINK; it shouldn't do the latter.

brianharvey commented 8 years ago

P.S. Can we have the Kinect library? And, does it work for all versions (PC vs Xbox) of Kinect? Tnx.

jmoenig commented 8 years ago

the old version is still accessible at

http://snap.berkeley.edu/snapsource/stable/snap.html

hang on as I investigate...

(are you sure saving doesn't work?)

CameronParker commented 8 years ago

From what I could tell, 4.04 wasn’t working with their projects, yes. I can likely get you account login/project name tomorrow from the students affected if you want/need it.

From: Jens Mönig [mailto:notifications@github.com] Sent: Tuesday, December 15, 2015 1:14 PM To: jmoenig/Snap--Build-Your-Own-Blocks Cc: Parker, Cameron SHS - Staff Subject: Re: [Snap--Build-Your-Own-Blocks] Projects saved on 12/14 will open on 12/15, but cannot be saved/exported (#1065)

the old version is still accessible at

http://snap.berkeley.edu/snapsource/stable/snap.html

hang on as I investigate...

(are you sure saving doesn't work?)

— Reply to this email directly or view it on GitHubhttps://github.com/jmoenig/Snap--Build-Your-Own-Blocks/issues/1065#issuecomment-164898126.

CameronParker commented 8 years ago

Hi Brian,

The Source Code is here: https://github.com/Michael0x2a/kinect-2-snap/find/master

The built Python .exe on Git had some issues so I’ve been running the .py file directly for the mini web server.

It does require a bunch of by-hand configuration the first time, which I handle to avoid students needing to deal with this. I haven’t had the time to package it all up in a single installer. The good thing is that once it’s installed/setup it works reliably. I’ve been using the PC version of the Kinects with the 1.8 Kinect SDK. Not sure if Xbox Kinects will work, and I don’t think MS even publishes that version of the SDK anymore.

Refer to needed files on a shared OneDrive folder at: http://1drv.ms/225iVcK

First/one-time install steps: • Attach the Kinect • Plug the Kinect into the wall/power strip • Plug the Kinect into a USB port • Wait for drivers to finish install (OS should handle this automatically) • Install KinectSDK 1.8 (on OneDrive share) • Install Python 2.x from https://www.python.org/downloads. Haven’t tested with 3.x Python. • Add to system PATH: c:\python27;c:\python27\lib;c:\python27\scripts • System control panel, Advanced System Settings link on left, then Environment variables button • Edit path variable and append the above paths (separate all paths with a ;) • Run get-pip.py from OneDrive folder (this is a python library downloader/installer tool) • Open a command prompt (Windows key + R, then cmd.exe) • CD\Python27\Tools\Scripts • Now inside the command prompt black window install some python libraries needed: • pip install flask • pip install flask-cors • pip install pykinect • pip install greenlet • Run gevent installer from OneDrive folder (also a Python util) • Copy Kinect2Snap folder from public drive to your C: drive (the root folder works) • Open Kinect2Snap folder, double click server.py • This is the mini web server. • If you want to test it to make sure the plumbing is working without Snap, just open the browser and nav to http://localhost:5000/demo. This show a Javascript skeleton where z-depth is represented by the size of the circles/joints. • The server responds with space-separated data that Snap code parses • Copy Sample for Snap.xml from Kinect utility folder to hard drive, and import into Snap • This has blocks on the stage and a few sprites that get a basic skeleton moving • Import “Sample for Snap.xml” into Snap and click the green flag. Use this as a kickoff set of code for your own projects.

All future use:

· Plug in Kinect into same USB port (have to wait for drivers to install if you use a different port)

· Run server.py (I put a shortcut on my desktop)

· Run the demo url noted above if you want to be sure it’s all working

· Run Snap and load your projects

Notes:

· OneDrive folder has joint index data in the file “Kinect joint index offsets.docx”

· The web URL call can be modified/copied to also retrieve skeleton 2 from the Kinect (change the 1 to a 2)

· The sample code only creates variables for commonly used joints. You can add more variables (or refer to the indices in the list directly) to get other joint data

· Z data is in millimeters away from the Kinect (1000 = 1m away, 2000 = 2m, etc.)

Let me know if you have any questions.

Thanks Cameron Parker Skyline HS IB and Intro to CS teacher, FIRST Robotics Club Adviser/Mentor

From: Brian Harvey [mailto:notifications@github.com] Sent: Tuesday, December 15, 2015 12:53 PM To: jmoenig/Snap--Build-Your-Own-Blocks Cc: Parker, Cameron SHS - Staff Subject: Re: [Snap--Build-Your-Own-Blocks] Projects saved on 12/14 will open on 12/15, but cannot be saved/exported (#1065)

P.S. Can we have the Kinect library? And, does it work for all versions (PC vs Xbox) of Kinect? Tnx.

— Reply to this email directly or view it on GitHubhttps://github.com/jmoenig/Snap--Build-Your-Own-Blocks/issues/1065#issuecomment-164893309.

jmoenig commented 8 years ago

So, I've been investigating, and I cannot reproduce the errors you're reporting using the "official" version of Snap hosted at http://snap.berkeley.edu/run right now. I can both load and save my projects, and also re-save projects I've saved in old versions, and my test cases - including continuations - work the same as they did before.

Can you please make sure that your modules in the "about snap" dialog have the following versions:

404151215

and if they don't re-load Snap until the current module versions show up?

Thanks!

brianharvey commented 8 years ago

Thanks for the Kinect software! I'll have fun playing with it, but it looks like it's not quite ready to post on the Snap! page? Is this under active development? (I.e., are you going to make the one-click installer?)

cycomachead commented 8 years ago

If you have a particular project, then that will certainly make testing much easier!

CameronParker commented 8 years ago

No active development on it, no. I may try to get a student to package it up, but it's not what I'd consider motivating work :-)


From: Brian Harvey [notifications@github.com] Sent: Tuesday, December 15, 2015 3:32 PM To: jmoenig/Snap--Build-Your-Own-Blocks Cc: Parker, Cameron SHS - Staff Subject: Re: [Snap--Build-Your-Own-Blocks] Projects saved on 12/14 will open on 12/15, but cannot be saved/exported (#1065)

Thanks for the Kinect software! I'll have fun playing with it, but it looks like it's not quite ready to post on the Snap! page? Is this under active development? (I.e., are you going to make the one-click installer?)

— Reply to this email directly or view it on GitHubhttps://github.com/jmoenig/Snap--Build-Your-Own-Blocks/issues/1065#issuecomment-164928079.