Skip to content

Check line number error for array scenario bug #81

Open
@maddyjoe

Description

@maddyjoe

We've had feedback of 2 issues with output error stating the incorrect input row number from MZ (Sam) team.

Details so that we can try and recreate the bug, and look at a fix
Example 1 =
Several students defined pixel arrays with either more or less than 64 elements, which would produce the error; ValueError: Pixel lists must have 64 elements on line 1020 – but when the error line should have been reported as 37 for example.
Is the line number in the full body of python code being interpreted by Skulpt in the background? This confused a lot of the students and they didn’t know which line the issue was on – would be nice to have a row highlight if possible.

Example 2 =
running this code Richard has supplied

from sense_hat import SenseHat
sh = SenseHat()
sh.color.gain = 60
col = sh.color
print(col.red, col.blue, col.green, col.clear)

Should produce something like:
49 5 20 37
But using the editor gives an IndexError with an incorrect row number in error message

Once we know what we're doing it's row 4 on this spreadsheet that'll need updating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions