Minimum reproducible example:
import cortex
volume = cortex.Volume.random(subject='S1', xfmname='fullhead')
def pickerfun(*args):
print("picked:", args)
# create viewer
cortex.webgl.show(data=volume, port=1420, open_browser=True, autoclose=False, pickerfun=pickerfun)
import time
while True: time.sleep(0.5) # this is needed if running as a script
There is output in the web console, e.g.:
Picked vertex 95507 (orig 96465) in left hemisphere, voxel=[67,32,17]
Value on click: -0.12599994242191315
but there is none in the Python script.