https://dagster.io/ logo
#ask-community
Title
# ask-community
r

Roei Jacobovich

05/29/2022, 12:02 PM
Hey - we ran into one of the weirdest bugs I’ve seen in PyYAML (https://github.com/yaml/pyyaml/issues/98) as part of Dagster run config. We have a resource with a field configured to be a string (using str annotation or a
Field(String)
as well), and a string value starting with zero. When running Dagit, the string is being converted to integer. For example, using value “0345” lead to:
Copy code
Invalid scalar at path root:resources:x. Value "345" of type "<class 'int'>" is not valid for expected type "String".
Thanks
dagster bot resolve to issue 1
1
o

owen

05/31/2022, 4:11 PM
hi @Roei Jacobovich, thanks for the report! Just to nail down exactly what's happening, where is your run config originally defined in this case? Do you have a dictionary in your python code which is then being modified in the Launchpad view in Dagit, or is the config being defined directly/entirely in Dagit?
r

Roei Jacobovich

05/31/2022, 5:01 PM
Hi @owen, thanks for the response. We have a Python
dict
, related to a resource (with config schema definition as part of the resource) appropriately loaded into the job config (as part of the
JobDefinition
). Scheduling that job works great without any issues. When we’re going to Dagit and clicking on the job’s run launcher tab, it’s being converted to YAML in the background (I suppose), and then we get the error I wrote about.
o

owen

05/31/2022, 5:10 PM
@Dagster Bot issue String to int conversion issue when config is loaded into the Dagit Launchpad
d

Dagster Bot

05/31/2022, 5:10 PM
o

owen

05/31/2022, 5:11 PM
hi @Roei Jacobovich thanks for the extra info, just created an issue for this bug (er.. two of them I guess).
cc @dish
d

dish

05/31/2022, 5:29 PM
This error appears in Python, is that correct? What does Dagit show in the Launchpad config editor?
r

Roei Jacobovich

05/31/2022, 6:08 PM
Thanks, @owen! @dish - correct, Python. Dagit shows the string as an integer (with zero at the start) with the following error message:
Invalid scalar at path root:resources:myresource:config:somekey. Value "3456" of type "<class 'int'>" is not valid for expected type "String".