Switching from BLOCK to PYTHON : TRANSFERRED to micro:bit only the blocks, not the phyton!!
I wrote a program in blocks, switched it from BLOCKS to PHYTON, programmed more and more in PHYTON, saved it and then started the TRANSFER to the micro:bit, testing, all worked the same, then bugfixing in PHYTON, save, transfer, the same as before... and so one. After more than 100 edits of the PHYTON code, i switched back from PHYTON to BLOCKS, and there was the old BLOCKS program, of the first time, before i switched it to PHYTON!! The editor has more than one program in his memories, so it only transfer BLOCKS to the micro:bit, never it transferred the PHYTON code to the micro:bit!
My project is halted due to this severe error until you fix that.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots Add screenshots to help explain your problem. You can copy paste the screenshot in the github report. The .gif screen recording is very useful as well.
micro:bit version (please complete the following information):
You can find this information in the lower right hand corner of the back of micro:bit (the side that says BBC micro:bit).
- Which version of the micro:bit is this relevant to [ EG V1.3, V1.5, V2.0, or specify it's not hardware related ]
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Arising from support ticket https://support.microbit.org/helpdesk/tickets/72697 (private)
@abchatra Please see the simple example below.
Errors in Python code are not highlighted, and mostly simply ignored. When there is an error, download, blocks mode and the simulator seem to quietly fall back to the last good Blocks (or is it Javascript?) code.
Without warning, switching to Blocks mode loses all changes in Python code since an error was introduced.
One partial workaround is to test every change to the Python code by trying to switch to Javascript mode. That at least reveals that there is an error without losing code, but doesn't give any clue to its location.
For a simple example, start with this code:
basic.show_number(0)
def on_forever():
pass
basic.forever(on_forever)
Create an error. The error is not highlighted.
basic.show_number(0)
def on_forever():
sleep(1000)
basic.forever(on_forever)
Change the number
basic.show_number(1)
def on_forever():
sleep(1000)
basic.forever(on_forever)
Changes after the error are simply ignored by download or a switch to blocks, and the simulator
Also raised in support ticket https://support.microbit.org/helpdesk/tickets/73266 (private)
this doesn't repro in beta