parallaxinc / BlocklyPropClient

Client to provide access to the propeller for loading binaries and serial terminal
9 stars 7 forks source link

KeyError: 'Darwin' #1

Closed podion closed 9 years ago

podion commented 9 years ago

wen i try Python BlocklyServer.py I receive this KeyError: 'Darwin'

Do i did something wrong ?

MacBook-Pro:BlocklyPropClient-master podion85$ python BlocklyServer.py Traceback (most recent call last): File "BlocklyServer.py", line 17, in class BlocklyServer(object): File "BlocklyServer.py", line 54, in BlocklyServer propellerLoad = PropellerLoad() File "/Users/podion85/Downloads/BlocklyPropClient-master/PropellerLoad.py", line 22, in init if not self.propeller_load_executables[platform.system()]: KeyError: 'Darwin' MacBook-Pro:BlocklyPropClient-master podion85$

michel-cf commented 9 years ago

Until now Apple computers always identified themselves as MacOS, apparently yours identifies itself as Darwin.

I'll add Darwin as a platform, using the same executables as MacOS. I hope it'll work that way. Sadly I have no Mac to test this.

michel-cf commented 9 years ago

It should be fixed now. Please let me know if you have any more problems using your MacBook

podion commented 9 years ago

I just test your code and it work find

But in my browser I dont see any blocks

And thank you for your fast work !

safari

Last login: Sat Nov 15 12:31:20 on ttys001 MacBook-Pro:~ podion85$ cd '/Users/podion85/Downloads/BlocklyPropClient-master/' && '/usr/local/bin/pythonw' '/Users/podion85/Downloads/BlocklyPropClient-master/BlocklyServer.py' && echo Exit status: $? && exit 1 [15/Nov/2014:14:53:34] ENGINE Listening for SIGHUP. [15/Nov/2014:14:53:34] ENGINE Listening for SIGTERM. [15/Nov/2014:14:53:34] ENGINE Listening for SIGUSR1. [15/Nov/2014:14:53:34] ENGINE Bus STARTING [15/Nov/2014:14:53:34] ENGINE Starting WebSocket processing [15/Nov/2014:14:53:34] ENGINE Started monitor thread 'Autoreloader'. [15/Nov/2014:14:53:34] ENGINE Started monitor thread '_TimeoutMonitor'. [15/Nov/2014:14:53:34] ENGINE Serving on http://127.0.0.1:6009 [15/Nov/2014:14:53:34] ENGINE Bus STARTED 127.0.0.1 - - [15/Nov/2014:14:55:47] "GET / HTTP/1.1" 200 45 "http://blocklyprop.creatingfuture.eu/blocklyspin.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25" 127.0.0.1 - - [15/Nov/2014:14:55:47] "GET /ports.json HTTP/1.1" 200 2 "http://blocklyprop.creatingfuture.eu/blocklyspin.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25" 127.0.0.1 - - [15/Nov/2014:14:56:07] "GET / HTTP/1.1" 200 45 "http://blocklyprop.creatingfuture.eu/blocklyspin.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25" 127.0.0.1 - - [15/Nov/2014:14:56:07] "GET /ports.json HTTP/1.1" 200 2 "http://blocklyprop.creatingfuture.eu/blocklyspin.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25" 127.0.0.1 - - [15/Nov/2014:14:56:27] "GET / HTTP/1.1" 200 45 "http://blocklyprop.creatingfuture.eu/blocklyspin.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25" 127.0.0.1 - - [15/Nov/2014:14:56:47] "GET / HTTP/1.1" 200 45 "http://blocklyprop.creatingfuture.eu/blocklyspin.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25" 127.0.0.1 - - [15/Nov/2014:14:57:07] "GET / HTTP/1.1" 200 45 "http://blocklyprop.creatingfuture.eu/blocklyspin.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25"

michel-cf commented 9 years ago

I'm aware, the latest build of Blockly seems to have a problem. As soon as I have time I'll try to fix it.

podion commented 9 years ago

Ok thanks

And if it could help you... wen i open a project in community i see blocks. Wen i try to load the programme it's just compiled the programme dont load in Ram or EEPROM.

sans titre

michel-cf commented 9 years ago

It's only the C version that doesn't work. The spin version shows the blocks fine.

Creating a new project is currently not possible as I'm reworking the way projects are created and that is not yet working sadly.

Compiling and running should work fine. As well as the serial terminal.

michel-cf commented 9 years ago

If compiling and loading gives errors and doesn't work, it could be that the native executables not work for your version. I don't know what's the difference between MacOS and Darwin as platform.

Possibly the OS version?

michel-cf commented 9 years ago

The C version shows it's Blocks again. Could you test again if compiling and loading into the Propeller works?

Thank you

podion commented 9 years ago

The c version give me a popup on start. wen i click ok and try to add some blocks, the blocks dont show-up sans titre

podion commented 9 years ago

Wen i load a C program in Community and try to load in EEPROM it's stay like this forever. sans titre

michel-cf commented 9 years ago

Unlike the Spin compiler, the C compiler doesn't give output when the compilation succeeds.

There is logic that should put 'Compile successful" into the result console but that sadly doesn't seem to work yet. I'll spend a bit more time on the BlocklyPropClient to get it more user friendly/robust.

Edit: I created a new bug for this: #2

Thanks for testing and reporting problems

michel-cf commented 9 years ago

I've now fixed the problem with creating a new project in the C version. The init alert is also gone.

Please note that creating new projects is still not possible (valid) as there is data missing (title, description)