enlive icon indicating copy to clipboard operation
enlive copied to clipboard

HTML resource not found

Open owenRiddy opened this issue 3 years ago • 0 comments

I can't figure out why following the quickstart guide is giving me an error. This may be a bug.

/enlive % tree
.
├── deps.edn
├── main.clj
└── templates
    └── application.html

1 directory, 3 files

/enlive % cat deps.edn 
{:deps
 {
  enlive/enlive {:mvn/version "1.1.6"}
  }}

/enlive % cat main.clj 
(require '[net.cgrand.enlive-html :as html])

(html/deftemplate main-template "templates/application.html"
  [])

/enlive % cat templates/application.html 
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>This is a title placeholder</title>
  </head>
  <body>
  </body>
</html>

/enlive % clojure -M main.clj
Execution error (NullPointerException) at net.cgrand.tagsoup/parser (tagsoup.clj:30).
HTML resource not found.

Full stacktrace:

{:clojure.main/message
 "Execution error (NullPointerException) at net.cgrand.tagsoup/parser (tagsoup.clj:30).\nHTML resource not found.\n",
 :clojure.main/triage
 {:clojure.error/class java.lang.NullPointerException,
  :clojure.error/line 30,
  :clojure.error/cause "HTML resource not found.",
  :clojure.error/symbol net.cgrand.tagsoup/parser,
  :clojure.error/source "tagsoup.clj",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.Compiler$CompilerException,
    :message "Syntax error macroexpanding at (main.clj:3:1).",
    :data
    {:clojure.error/phase :execution,
     :clojure.error/line 3,
     :clojure.error/column 1,
     :clojure.error/source "main.clj"},
    :at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3711]}
   {:type java.lang.NullPointerException,
    :message "HTML resource not found.",
    :at [net.cgrand.tagsoup$parser invokeStatic "tagsoup.clj" 30]}],
  :trace
  [[net.cgrand.tagsoup$parser invokeStatic "tagsoup.clj" 30]
   [net.cgrand.tagsoup$parser invoke "tagsoup.clj" 27]
   [net.cgrand.enlive_html$eval258$fn__259 invoke "enlive_html.clj" 89]
   [clojure.lang.MultiFn invoke "MultiFn.java" 234]
   [net.cgrand.enlive_html$html_resource
    invokeStatic
    "enlive_html.clj"
    69]
   [net.cgrand.enlive_html$html_resource invoke "enlive_html.clj" 66]
   [net.cgrand.enlive_html$html_resource
    invokeStatic
    "enlive_html.clj"
    72]
   [net.cgrand.enlive_html$html_resource invoke "enlive_html.clj" 66]
   [user$fn__1022 invokeStatic "main.clj" 3]
   [user$fn__1022 invoke "main.clj" 3]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.AFn applyTo "AFn.java" 144]
   [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3706]
   [clojure.lang.Compiler$DefExpr eval "Compiler.java" 457]
   [clojure.lang.Compiler eval "Compiler.java" 7186]
   [clojure.lang.Compiler load "Compiler.java" 7640]
   [clojure.lang.Compiler loadFile "Compiler.java" 7578]
   [clojure.main$load_script invokeStatic "main.clj" 475]
   [clojure.main$script_opt invokeStatic "main.clj" 535]
   [clojure.main$script_opt invoke "main.clj" 530]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "HTML resource not found.",
  :phase :execution}}

owenRiddy avatar Jan 17 '22 10:01 owenRiddy