Describe the bug
Error on sensor.ambient(None) is:
TypeError: function takes 1 positional arguments but 2 were given
But the ambient method has no parameter documented.
To reproduce
Steps to reproduce the behavior:
Run the program (below) on code.pybricks.com with a Spike Color sensor on port-B
Look at the console
See the error in the last lines
Expected behavior
Report that no parameters are supported for this method
Screenshots
None
source
#
from pybricks.pupdevices import ColorSensor
from pybricks.parameters import Port
from pybricks.tools import wait
# Initialize the sensor.
sensor = ColorSensor(Port.B)
# Get the ambient light intensity.
ambient = sensor.ambient()
print("ambient:", ambient)
# No parameter documented for ambient method
ambient = sensor.ambient(None)
ambient = sensor.ambient(None,None)
Describe the bug Error on
sensor.ambient(None)
is:TypeError: function takes 1 positional arguments but 2 were given
But theambient
method has no parameter documented.To reproduce Steps to reproduce the behavior:
Expected behavior Report that no parameters are supported for this method
Screenshots None
source