Oh, I see. I had just changed :admin-text to hold a keyword instead of
text. I should have seen that sooner.

But I am still confused why a keyword would cause pprint to throw an
exception. And why at that point in the code, and not sooner?



On Apr 16, 10:05 am, larry google groups <lawrencecloj...@gmail.com>
wrote:
> The function before the previously mentioned function is this:
>
> (defn add-public-text-to-top-banner-and-return-as-new-template
> [template item]
>   (println "entering add-public-text-to-top-banner-and-return-as-new-
> template")
>   (println (pp/pprint template))
>   (enlive/transform template [:#content :> :h1 :span] (enlive/content
> (:admin-text item))))
>
> I am not clear why this kills the template, but it seems to. Here,
> pprint works and shows the Enlive nodes. But in the next function I
> get an exception.
>
> On Apr 16, 9:59 am, larry google groups <lawrencecloj...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > On the first pprint expression in this function, I get an exception:
>
> > (defn add-main-image-for-this-item-and-return-as-new-template
> > [template item]
>
> > (println " start of add-main-image-for-this-item-and-return-as-new-
> > template")
>
> > (println (pp/pprint template))
> >   (println "add-main-image-for-this-item-and-return-as-new-template")
> >   (let [final-template (if-not (nil? (:filename item))
> >                          (enlive/transform template [:#main-image-for-
> > this-item] (enlive/html-content (str "<img src='/serve-file/" (str
> > (:filename item)) "' />")))
> >                          template)]
> > (println (pp/pprint final-template))
> >       (println "  leaving add-main-image-for-this-item-and-return-as-
> > new-template")
> >     final-template))
>
> > The exception is:
>
> >  start of add-main-image-for-this-item-and-return-as-new-template
> > 2013-04-16 09:54:23.536:WARN:oejs.AbstractHttpConnection:/admin/edit/
> > planners/summer-camp3804946
> > java.lang.IllegalArgumentException: Don't know how to create ISeq
> > from: clojure.lang.Keyword
> >         at clojure.lang.RT.seqFrom(RT.java:494)
> >         at clojure.lang.RT.seq(RT.java:475)
>
> > Why would anything blow up on pprint? I thought pprint could handle
> > anything?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to