Hey - we ran into one of the weirdest bugs I’ve se...
# ask-community
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
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".
dagster bot resolve to issue 1
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?
Hi @owen, thanks for the response. We have a Python
, related to a resource (with config schema definition as part of the resource) appropriately loaded into the job config (as part of the
). 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.
@Dagster Bot issue String to int conversion issue when config is loaded into the Dagit Launchpad
hi @Roei Jacobovich thanks for the extra info, just created an issue for this bug (er.. two of them I guess).
cc @dish
This error appears in Python, is that correct? What does Dagit show in the Launchpad config editor?
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".