blockpy-edu/blockpy

TypeError: Sk.console.printPILImage is not a function on line 4, please help

Opened this issue · 4 comments

TypeError: Sk.console.printPILImage is not a function on line 4, please help

trying to run this code using skulpt..
"""
import PIL
a = PIL.Image('pic2.jpg')
a.show()
"""

@rahulrawat17 You need Skulpt specifically or just BlockPy?

Here, at Coding Rooms, you can create a Python workspace without an account and use BlockPy. https://www.codingrooms.com/compiler/python3/

Just select the 3 dots menu next to the files name and click "Open in Block Editor" to see the blocks editor.
image

maybe both, i am trying to display image on output area using skulpt and some files of blockpy

@rahulrawat17 Coding Rooms will work because it is not using Skulpt. The issue is the PIL library.

I do not see PIL as a library packaged with Skulpt - https://github.com/skulpt/skulpt/tree/master/src/lib

You would need to implement it yourself.