blockpy icon indicating copy to clipboard operation
blockpy copied to clipboard

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

Open rahulrawat17 opened this issue 4 years ago • 4 comments

rahulrawat17 avatar Jun 04 '21 04:06 rahulrawat17

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

rahulrawat17 avatar Jun 08 '21 11:06 rahulrawat17

@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

MrMazzone avatar Jun 08 '21 11:06 MrMazzone

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

rahulrawat17 avatar Jun 08 '21 11:06 rahulrawat17

@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.

MrMazzone avatar Jun 08 '21 12:06 MrMazzone