Isinstance() arg 2 must be a class exception when saving...?


#1



my_dict = { "a":"1" , "x":"98" , "rw":"101" ,"zx":"23456" }

print(my_dict)
print(my_dict.keys())
print(my_dict.values())

This code runs when I "Save & Submit Code" and produces output OK but then I get this error at the bottom of the screen..

        isinstance() arg 2 must be a class, type, or tuple of classes and types

Can anyone advise? It runs fine in PyCharm with no exceptions.

Thanks
Gary


#2

@rubyace23233,
Maybe...
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#3

Thanks Leonhard, I refreshed the browser tab and.... the submit worked fine!

Regards

Gary