-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: attr: 'style :width' failed validation #6
Comments
PRs welcome! |
Sure, Will give it a try! |
Is this error with the main branch? Also, when I run It is probably me missing something. |
Hi @eddielao try running clj -X:test instead of clojure -M:test and report back if any problems. |
Also, if still a problem say which environment you're running in; e.g. Windows, Mac, Linux |
I resolved this. Your dictim (in the template) is NOT correct. width and height are both top level attributes and not sub-keys of style... exactly as the error message was saying |
same as d2 btw |
Windows 11 Pro version 10.0.22631 Build 22631 This is the error I got from running --- Error--- Running tests in #{"test"} Testing dictim.d2.compile-test Testing dictim.d2.parse-test ERROR in (connections) (utils.cljc:8) FAIL in (classes) (parse_test.clj:288) ERROR in (classes) (utils.cljc:8) FAIL in (classes) (parse_test.clj:290) FAIL in (classes) (parse_test.clj:314) ERROR in (classes) (utils.cljc:8) FAIL in (classes) (parse_test.clj:316) FAIL in (shapes) (parse_test.clj:20) ERROR in (shapes) (utils.cljc:8) FAIL in (shapes) (parse_test.clj:22) FAIL in (interactive) (parse_test.clj:234) FAIL in (interactive) (parse_test.clj:236) FAIL in (textandcode) (parse_test.clj:252) ERROR in (textandcode) (utils.cljc:8) FAIL in (textandcode) (parse_test.clj:254) FAIL in (containers) (parse_test.clj:40) ERROR in (containers) (utils.cljc:8) FAIL in (containers) (parse_test.clj:42) FAIL in (sql) (parse_test.clj:141) ERROR in (sql) (utils.cljc:8) FAIL in (sql) (parse_test.clj:143) FAIL in (sequence-digrams) (parse_test.clj:175) ERROR in (sequence-digrams) (utils.cljc:8) FAIL in (sequence-digrams) (parse_test.clj:177) FAIL in (styles) (parse_test.clj:133) ERROR in (styles) (utils.cljc:8) FAIL in (globs) (parse_test.clj:347) ERROR in (globs) (utils.cljc:8) FAIL in (globs) (parse_test.clj:349) Testing dictim.flat-test Testing dictim.graphspec-test Testing dictim.json-test Testing dictim.template-test Ran 81 tests containing 357 assertions. |
Thanks @eddielao I think I begin to see what is going on here. |
You're very welcome, @judepayne ! Let me know what else I can help with. |
Add width & height attributes to the style property in a dictim file.
Create a d2 file.
Run the dictim command to generate the d2 file.
open the generated d2 file.
the d2 file contains error message: attr: 'style :width' failed validation, in {:classes {"spr" {:style {:stroke-dash 3, :stroke-width 2, :width 200, :height 300, :stroke "'#444499'"}}, "db" {:shape "cylinder", :style {:stroke-width 5, :fill "'#c7f0c5'", :stroke "'#87b085'", :text-transform :uppercase}}}}
dictim copy.txt
in.d2.txt
out2.d2 copy.txt
For more please check out the attachment.
The text was updated successfully, but these errors were encountered: