tonyvanriet / lunch-bot

A Slack bot that manages group lunch activity
MIT License
26 stars 5 forks source link

lunch-bot fails to start unless non-zero-sized events.edn is present #1

Closed keeth closed 9 years ago

keeth commented 9 years ago

if events.edn is missing or has zero sized, lunch-bot fails with:

(start)
NullPointerException   java.util.regex.Matcher.getTextLength (Matcher.java:1283)
(print-stack-trace *e)
java.lang.NullPointerException: null
 at java.util.regex.Matcher.getTextLength (Matcher.java:1283)
    java.util.regex.Matcher.reset (Matcher.java:309)
    java.util.regex.Matcher.<init> (Matcher.java:229)
    java.util.regex.Pattern.matcher (Pattern.java:1093)
    java.util.regex.Pattern.split (Pattern.java:1206)
    java.util.regex.Pattern.split (Pattern.java:1273)
    clojure.string$split.invoke (string.clj:222)
    clojure.string$split_lines.invoke (string.clj:230)
    lunch_bot.store$edn__GT_maps.invoke (store.clj:52)
    lunch_bot.store$read_maps.invoke (store.clj:75)
    lunch_bot.store$read_events.invoke (store.clj:78)
    lunch_bot.event$initialize_events.invoke (event.clj:12)
    lunch_bot.core$start.invoke (core.clj:210)
    lunch_bot.core$start.invoke (core.clj:207)
    lunch_bot.core$eval10674.invoke (form-init1971661883669074996.clj:1)
    clojure.lang.Compiler.eval (Compiler.java:6703)
    clojure.lang.Compiler.eval (Compiler.java:6666)
    clojure.core$eval.invoke (core.clj:2927)
    clojure.main$repl$read_eval_print__6625$fn__6628.invoke (main.clj:239)
    clojure.main$repl$read_eval_print__6625.invoke (main.clj:239)
    clojure.main$repl$fn__6634.invoke (main.clj:257)
    clojure.main$repl.doInvoke (main.clj:257)
    clojure.lang.RestFn.invoke (RestFn.java:1523)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__9613.invoke (interruptible_eval.clj:67)
    clojure.lang.AFn.applyToHelper (AFn.java:152)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invoke (core.clj:624)
    clojure.core$with_bindings_STAR_.doInvoke (core.clj:1862)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:51)
    clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__9655$fn__9658.invoke (interruptible_eval.clj:183)
    clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__9648.invoke (interruptible_eval.clj:152)
    clojure.lang.AFn.run (AFn.java:22)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    java.lang.Thread.run (Thread.java:745)
tonyvanriet commented 9 years ago

Yes! My first Github issue! Thanks Keeth. I should be able to get this cleared up tonight.

tonyvanriet commented 9 years ago

keeth, you're the first person I've heard from that's trying to use lunch-bot. If you decide to continue, let me know how it goes. I'm curious to find out if the use cases can fit somebody else's group lunch habits, or if it's just been tuned to my particular group.

keeth commented 9 years ago

Hi @tonyvanriet, I came to lunch-bot more to see an example of a Slack bot in Clojure. Now I've got a bot working using clj-slack-client, which is a great library.