The code in the snippet below comes from the docum...
# ask-community
The code in the snippet below comes from the documentation: However it does not work and returns the error below. Is this a problem on my end or in the documentation?
Copy code
Traceback (most recent call last):
  File "/Users/thomas/miniforge3/envs/datagenerator/lib/python3.10/site-packages/IPython/core/", line 3433, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-22-26c8dc208c5a>", line 10, in <module>
    ins={"num": In(EvenDagsterType)},
TypeError: 'list' object is not callable
hi @Thomas I will check this in a minute (hopping in a meeting right now), but could you try removing the comma from the end of the lambda function? so it would be `
Copy code
lambda _, value: isinstance(value, int) and value % 2 == 0
Hi @jamie thanks, unfortunately it did not change the error code. Did you find anything else? Thanks!
not yet. i have a bit of time right now, so i’m going to try to replicate this
hmmm it works for me. here’s what i’m doing
Copy code
from dagster import op, DagsterType, In, Out, job, repository

EvenDagsterType = DagsterType(
    type_check_fn=lambda _, value: isinstance(value, int) and value % 2 == 0,

def two():
    return 2

    ins={"num": In(EvenDagsterType)},
def double_even(num):
    return num

def my_job():

def my_repo():
    return [my_job]
and then loading up dagit and running the job from there. I’m also running latest version of dagster
❤️ 1
Thank you for the help!