`Divide by zero` and other errors out of the box
tgecho opened this issue · 2 comments
I'm on MacOS with these installed via homebrew:
- Clojure CLI version 1.10.3.998
- Leiningen 2.9.7 on Java 17.0.1 OpenJDK 64-Bit Server VM
I get the following exception when I start following through the tutorial:
$ lein run
Exception in thread "main" java.lang.ArithmeticException: Divide by zero, compiling:(/private/var/folders/rd/wv69_b9162zd60yfpdxb3kpm0000gn/T/form-init773116273006867215.clj:1:124)
at clojure.lang.Compiler.load(Compiler.java:7526)
at clojure.lang.Compiler.loadFile(Compiler.java:7452)
at clojure.main$load_script.invokeStatic(main.clj:278)
at clojure.main$init_opt.invokeStatic(main.clj:280)
at clojure.main$init_opt.invoke(main.clj:280)
at clojure.main$initialize.invokeStatic(main.clj:311)
at clojure.main$null_opt.invokeStatic(main.clj:345)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.invokeStatic(main.clj:424)
at clojure.main$main.doInvoke(main.clj:387)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.main.main(main.java:37)
Caused by: java.lang.ArithmeticException: Divide by zero
at clojure.lang.Numbers.divide(Numbers.java:163)
at scad_tarmi.dfm$ratio.invokeStatic(dfm.clj:40)
at scad_tarmi.dfm$ratio.invoke(dfm.clj:40)
at scad_tarmi.dfm$error_fn$compensator__4233.doInvoke(dfm.clj:62)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at scad_tarmi.dfm$error_fn$compensator__4233.invoke(dfm.clj:55)
at dactyl_keyboard.cad.key.switch$cap_channel_negative$step__1713.invoke(switch.clj:52)
at dactyl_keyboard.cad.key.switch$cap_channel_negative.invokeStatic(switch.clj:68)
at dactyl_keyboard.cad.key.switch$cap_channel_negative.invoke(switch.clj:46)
at dactyl_keyboard.cad.key$cluster_channels$modeller__2299.invoke(key.clj:285)
at dactyl_keyboard.cad.key$cluster_channels$fn__2303.invoke(key.clj:290)
at clojure.core$map$fn__5587.invoke(core.clj:2745)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:528)
at clojure.core$seq__5124.invokeStatic(core.clj:137)
at clojure.core$apply.invokeStatic(core.clj:652)
at clojure.core$apply.invoke(core.clj:652)
at dactyl_keyboard.cad.key$cluster_channels.invokeStatic(key.clj:289)
at dactyl_keyboard.cad.key$cluster_channels.invoke(key.clj:282)
at dactyl_keyboard.cad.key$metacluster$fn__2311.invoke(key.clj:302)
at clojure.core$map$fn__5587.invoke(core.clj:2747)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:528)
at clojure.core$seq__5124.invokeStatic(core.clj:137)
at clojure.core$apply.invokeStatic(core.clj:652)
at clojure.core$apply.invoke(core.clj:652)
at dactyl_keyboard.cad.key$metacluster.invokeStatic(key.clj:302)
at dactyl_keyboard.cad.key$metacluster.invoke(key.clj:299)
at dactyl_keyboard.cad.body.assembly$main_body_right.invokeStatic(assembly.clj:215)
at dactyl_keyboard.cad.body.assembly$main_body_right.invoke(assembly.clj:205)
at dactyl_keyboard.core$finalize_asset.invokeStatic(core.clj:298)
at dactyl_keyboard.core$finalize_asset.invoke(core.clj:286)
at clojure.core$partial$fn__5563.invoke(core.clj:2624)
at clojure.core$partial$fn__5561.invoke(core.clj:2616)
at clojure.core$map$fn__5587.invoke(core.clj:2745)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:528)
at clojure.core$seq__5124.invokeStatic(core.clj:137)
at clojure.core$apply.invokeStatic(core.clj:652)
at clojure.core$mapcat.invokeStatic(core.clj:2775)
at clojure.core$mapcat.doInvoke(core.clj:2775)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at scad_app.core$refine_all.invokeStatic(core.clj:265)
at scad_app.core$refine_all.invoke(core.clj:260)
at dactyl_keyboard.core$builtin_assets.invokeStatic(core.clj:306)
at dactyl_keyboard.core$builtin_assets.invoke(core.clj:303)
at dactyl_keyboard.core$run.invokeStatic(core.clj:360)
at dactyl_keyboard.core$run.invoke(core.clj:355)
at dactyl_keyboard.core$execute_mode.invokeStatic(core.clj:389)
at dactyl_keyboard.core$execute_mode.invoke(core.clj:378)
at dactyl_keyboard.core$_main.invokeStatic(core.clj:412)
at dactyl_keyboard.core$_main.doInvoke(core.clj:408)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:377)
at user$eval149.invokeStatic(form-init773116273006867215.clj:1)
at user$eval149.invoke(form-init773116273006867215.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7062)
at clojure.lang.Compiler.eval(Compiler.java:7052)
at clojure.lang.Compiler.load(Compiler.java:7514)
... 12 more
It only succeeds when I jump to the step where I run lein run -c config/base.yaml -c butty.yaml
Trying to build lein run -c config/dactyl_manuform/base.yaml
also fails with this exception.
This happens on the latest commit (651532c) as well as the dmote-v0.7.0
tag. I tried going to even earlier tags but started getting dependency errors.
I realized later that I needed to lein run -c config/base.yaml -c config/dactyl_manuform/base.yaml
(as per the docs), but it still stands that the first step of the intro will trigger this exception.
Thank you for reporting this. I have traced the problem to scad-tarmi
and will release a fix tomorrow.