Your program is too large to convert into blocks

I have been working in Block code, and after committing my work to Github, the following error appeared:

I have had this appear a few times already. There are quite a lot of functions, maybe too many for block code (I don’t know). The following are the last few lines from the console (Chrome: Version 80.0.3987.122 (Official Build) (64-bit))

ignoring built in block: text_length
3pxtblockly.js:1 Deprecated call to Blockly.BlockSvg.prototype.setDisabled, use Blockly.BlockSvg.prototype.setEnabled instead.
(anonymous) @ pxtblockly.js:1
pxtapp.js:1 screenshot size 15764870b, shrinking to 6195x6057
pxtapp.js:1 screenshot size 5139546b, shrinking to 3097x3028
pxtapp.js:1 screenshot size 1966814b, shrinking to 1548x1514
3pxtblockly.js:1 Deprecated call to Blockly.BlockSvg.prototype.setDisabled, use Blockly.BlockSvg.prototype.setEnabled instead.
(anonymous) @ pxtblockly.js:1
pxtapp.js:1 screenshot size 1427850b, shrinking to 1089x2427
pxtapp.js:1 error: main.ts(1,1): error TS9266: Could not decompile because the script is too large

/#editor:1 Application Cache Checking event
/#editor:1 Application Cache NoUpdate event
/#editor:1 Application Cache Checking event
/#editor:1 Application Cache NoUpdate event
DevTools failed to parse SourceMap: https://pxt.azureedge.net/blob/55f03c4099991ef834cfc12c3d02dd2c7caac71f/purify.min.js.map
DevTools failed to parse SourceMap: https://pxt.azureedge.net/blob/min-maps/vs/editor/editor.main.js.map

Can someone offer any advice? I don’t normally code in Javascript, but I don’t mind if I have to continue that way. However, I do like coding in Blocks for the convenience.

I am having a separate issue that I am not able to able to load the game to my PyGamer, however, if I switch to Javascript, copy the entire code and paste into a separate project (which has never been published), then I can upload it.

The only problem now is is that I cannot switch back to Block code.

That’s weird! When reverting the changes made (via Github icon) which was something like the preferred editor, I was able to switch it back to Block code. :man_shrugging:

I am not sure but maybe richards Idea (in a livestream) Just write something like dhiuwhoifuhefiomcaiuhd iscuhnoiuo and then press on blocks and press Discard and go to blocks(save before though… dont delete it(sorry if it does not work)) But this si the only thing I know…

The strange thing is that I can still code in Blocks. When I switch to Javascript, and still haven’t changed anything, then the error appears saying that the script is too large. If I ignore the changes (which there are not any) to switch back to Blocks, it works again.

1 Like