https://dagster.io/ logo
Title
m

Max Rostron

04/14/2023, 11:35 AM
Am I being really daft here? I literally copied this exact function from the Dagster docs, which often seem to be incomplete. Also, if I pass in context on line 90/91, the deployment won't load:
Could not load location searchland_dagster to check for sensors due to the following error: dagster._core.errors.DagsterInvalidDefinitionError: "context" is not a valid name in Dagster. It conflicts with a Dagster or python reserved keyword.
What am I missing here? Please don't link me to docs as they really aren't helping. I'm just trying to set up a config. The second image is what I am actually trying to do.
:dagster-bot-responded-by-community: 1
v

Vinnie

04/14/2023, 11:50 AM
This is just your VSCode complaining, you don’t have to pass anything to an
op
called from a
job
, the
context
argument is created and passed on the background
m

Max Rostron

04/14/2023, 12:05 PM
Ah. That is a bit daft, but thank you very much! I've just added
# pylint: disable=E1120
for now
v

Vinnie

04/14/2023, 1:35 PM
On another note, AFAIK the argument should always be named
context
, I’m pretty sure dagster won’t recognize it as something internal if you try to name it
op_context
1