takePicture("small")

Issue #66 resolved
Keith O'Hara created an issue

Reported by Jay:

#This in correct code:

from Myro import *

init()
p = takePicture("small")  #Small not supported....
w = getWidth(p)


#Gives this very hard to figure out error message
Hello, my name is 'Scribby'!
Traceback (most recent call last):
  File "/home/summetj/projects/Calico/ErrorDemo.py", line 6, in <module>
TypeError: Multiple targets could match: getWidth(Picture),
getWidth(WindowClass)
python>>> type(p)
<type 'NoneType'>

Could we have getWidth(None) give a better error message?

(Or takePicture("small") give a better warning?)

Comments (5)

  1. Connor

    Hi keithohara, I think the takePicture function only takes a color mode as a parameter, not the pic size (http://wiki.roboteducation.org/Calico_Myro). The function you're looking for is setPicSize("small"), so your picture code would be:

    setPicSize("small") p = takePicture()

    I'm not sure, but I think you need a Fluke2 to take small pictures too. It works for me on Calico Python.

  2. Log in to comment