started getting this error after upgrading to 1.3....
# ask-community
c
started getting this error after upgrading to 1.3.9
Copy code
dagster._check.ParameterCheckError: Invariant violation for parameter Cannot specify resource requirements in both @sensor decorator and as arguments to the decorated function. Description: None
the sensor in question does not define resources in the decorator, and there haven't been any changes to its code since last week
s
hi @Charlie Bini this is a bug 😞 that will be fixed in next week's release. in the mean time, I'd recommend staying on 1.3.8 if you have a sensor that takes resource arguments.
c
oof ok, does it affect all sensors with resources, or only under certain conditions? I'm only having the issue with one sensor in particular
s
if the sensor is using
required_resource_keys
, it should work fine. when the resources are specified as part of the function definition is when the problem occurs.
c
odd, I have other sensors that have resources in fn args that loaded fine, ex: https://github.com/TEAMSchools/teamster/blob/main/src/teamster/core/achieve3k/sensors.py
s
oh also, the other precondition for the error to occur is for the sensor to target a job that has required resources that are supplied by the Definitions object, instead of within the job
they don't use resources so there might be another trigger at play
could be the pythonic op config maybe