Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread Jony Hudson
This is probably just a copy and paste problem, rather than the solution to 
your real problem, but ... the namespace declaration you've got in your OP 
is missing a couple of closing ).


Jony

On Sunday, 10 January 2016 07:28:00 UTC, Laws wrote:
>
> I've been staring at this for awhile, and moving it around, and re-typing 
> it, without seeing what the real error is. 
>
> I have a file called server.clj which includes this at the top in its 
> namespace declaration: 
>
> (ns salesvoice.server
>   (:require
>[salesvoice.query :as query]
>
>
> In query.clj, I have this: 
>
>
> (defn make-response
>   [company-name outputSpeech-text]
>   {"version"  "1.0"
>"sessionAttributes"  {
>  "company-name"  company-name
>  "user-id" "user-id"
>  }
>"response"  {
> "outputSpeech"  {
>  "type"  "PlainText"
>  "text"  outputSpeech-text
>  }
> "card"  {
>  "type"  "Simple"
>  "title"  (str "Sales Report for " company-name)
>  "content"  outputSpeech-text
>  } 
> "reprompt"  {
>  "outputSpeech"  {
>   "type"  "PlainText"
>   "text"  "Can I help you with 
> anything else?"
>   }
>  }
> "shouldEndSession"  true
> }
>})
>
>
> When I type "lein uberjar" at the command line I get: 
>
>
> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
> declaration make-response should be a vector, compiling:(server.clj:1:1)
>
> The parameter declaration for make-response is a vector. I am not clear 
> why I am getting this error. 
>
> Things I tried:
>
> 1.) moving this around in the file. It had been in the middle of 
> query.clj, but I moved it to the top, its now the first function defined in 
> that file
>
> 2.) re-typing the parameter declaration
>
> 3.) looking for other functions that have the same name, but grep shows 
> this is the only declaration
>
> So what could the real issue be? 
>
> Also, why does the error seem to show up when server.clj is including 
> query.clj. Shouldn't the error appear when query.clj is compiled? 
>
>
>
>
>
>
>
>
>
>

-- 
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/d/optout.


Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread Laws
Ah, finally found it:

(defn get-stop-response
  (make-response "No company specified" "Session ended" true))


I am surprised that the error was for "make-response" and not 
"get-stop-response". It is "get-stop-response" where I forgot the parameter 
declaration. 



On Sunday, January 10, 2016 at 12:25:57 PM UTC-5, Laws wrote:
>
> The implication, as I read it, is that there is some place where I do 
> something like this: 
>
> response-in-amazon-format (make-response company-name 
> outputSpeech-text false)]
>
> In some other function, and the compiler feels that I am defining a new 
> arity for that other function? But then I would expect to see the name of 
> the other function.
>
>
> On Sunday, January 10, 2016 at 2:52:48 AM UTC-5, James Elliott wrote:
>>
>> That is puzzling indeed. There doesn’t seem to be anything wrong with the 
>> function itself, as you say. I can evaluate it and run it.
>>
>> There must be some other element of your environment which you have not 
>> shared here which is throwing sand in the gears.
>>
>> On Sunday, January 10, 2016 at 1:28:00 AM UTC-6, Laws wrote:
>>>
>>> I've been staring at this for awhile, and moving it around, and 
>>> re-typing it, without seeing what the real error is. 
>>>
>>> I have a file called server.clj which includes this at the top in its 
>>> namespace declaration: 
>>>
>>> (ns salesvoice.server
>>>   (:require
>>>[salesvoice.query :as query]
>>>
>>>
>>> In query.clj, I have this: 
>>>
>>>
>>> (defn make-response
>>>   [company-name outputSpeech-text]
>>>   {"version"  "1.0"
>>>"sessionAttributes"  {
>>>  "company-name"  company-name
>>>  "user-id" "user-id"
>>>  }
>>>"response"  {
>>> "outputSpeech"  {
>>>  "type"  "PlainText"
>>>  "text"  outputSpeech-text
>>>  }
>>> "card"  {
>>>  "type"  "Simple"
>>>  "title"  (str "Sales Report for " company-name)
>>>  "content"  outputSpeech-text
>>>      }     
>>>     "reprompt"  {
>>>  "outputSpeech"  {
>>>   "type"  "PlainText"
>>>   "text"  "Can I help you 
>>> with anything else?"
>>>   }
>>>  }
>>> "shouldEndSession"  true
>>> }
>>>})
>>>
>>>
>>> When I type "lein uberjar" at the command line I get: 
>>>
>>>
>>> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
>>> declaration make-response should be a vector, compiling:(server.clj:1:1)
>>>
>>> The parameter declaration for make-response is a vector. I am not clear 
>>> why I am getting this error. 
>>>
>>> Things I tried:
>>>
>>> 1.) moving this around in the file. It had been in the middle of 
>>> query.clj, but I moved it to the top, its now the first function defined in 
>>> that file
>>>
>>> 2.) re-typing the parameter declaration
>>>
>>> 3.) looking for other functions that have the same name, but grep shows 
>>> this is the only declaration
>>>
>>> So what could the real issue be? 
>>>
>>> Also, why does the error seem to show up when server.clj is including 
>>> query.clj. Shouldn't the error appear when query.clj is compiled? 
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>

-- 
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/d/optout.


Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread Laws
The implication, as I read it, is that there is some place where I do 
something like this: 

response-in-amazon-format (make-response company-name 
outputSpeech-text false)]

In some other function, and the compiler feels that I am defining a new 
arity for that other function? But then I would expect to see the name of 
the other function.


On Sunday, January 10, 2016 at 2:52:48 AM UTC-5, James Elliott wrote:
>
> That is puzzling indeed. There doesn’t seem to be anything wrong with the 
> function itself, as you say. I can evaluate it and run it.
>
> There must be some other element of your environment which you have not 
> shared here which is throwing sand in the gears.
>
> On Sunday, January 10, 2016 at 1:28:00 AM UTC-6, Laws wrote:
>>
>> I've been staring at this for awhile, and moving it around, and re-typing 
>> it, without seeing what the real error is. 
>>
>> I have a file called server.clj which includes this at the top in its 
>> namespace declaration: 
>>
>> (ns salesvoice.server
>>   (:require
>>[salesvoice.query :as query]
>>
>>
>> In query.clj, I have this: 
>>
>>
>> (defn make-response
>>   [company-name outputSpeech-text]
>>   {"version"  "1.0"
>>"sessionAttributes"  {
>>  "company-name"  company-name
>>  "user-id" "user-id"
>>  }
>>"response"  {
>> "outputSpeech"  {
>>  "type"  "PlainText"
>>  "text"  outputSpeech-text
>>  }
>> "card"  {
>>  "type"  "Simple"
>>  "title"  (str "Sales Report for " company-name)
>>  "content"  outputSpeech-text
>>  } 
>> "reprompt"  {
>>  "outputSpeech"  {
>>       "type"  "PlainText"
>>   "text"  "Can I help you 
>> with anything else?"
>>   }
>>  }
>> "shouldEndSession"  true
>> }
>>})
>>
>>
>> When I type "lein uberjar" at the command line I get: 
>>
>>
>> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
>> declaration make-response should be a vector, compiling:(server.clj:1:1)
>>
>> The parameter declaration for make-response is a vector. I am not clear 
>> why I am getting this error. 
>>
>> Things I tried:
>>
>> 1.) moving this around in the file. It had been in the middle of 
>> query.clj, but I moved it to the top, its now the first function defined in 
>> that file
>>
>> 2.) re-typing the parameter declaration
>>
>> 3.) looking for other functions that have the same name, but grep shows 
>> this is the only declaration
>>
>> So what could the real issue be? 
>>
>> Also, why does the error seem to show up when server.clj is including 
>> query.clj. Shouldn't the error appear when query.clj is compiled? 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>

-- 
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/d/optout.


Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread Laws
Yes, I edited the namespace declaration. The full namespace declaration, in 
server.clj, is:

(ns salesvoice.server
  (:import
   [java.io FileNotFoundException])
  (:require
   [salesvoice.credentials :as credentials]
   [salesvoice.middleware :as middleware]
   [taoensso.timbre :as timbre]
   [compojure.core :refer :all]
   [compojure.handler :as handler]
   [compojure.route :as route]
   [me.raynes.fs :as fs]
   [clojure.java.io :as io]
   [clojure.string :as st]
   [ring.util.response :as rr]
   [net.cgrand.enlive-html :as enlive]
   [salesvoice.query :as query])
  (:use
   [ring.middleware.params]
   [ring.middleware.keyword-params]
   [ring.middleware.content-type]
   [ring.adapter.jetty :only [run-jetty]]
   [ring.middleware.json]))


Among the many random changes I made, in an attempt to find the real 
problem, I moved this line around:

   [salesvoice.query :as query]

just in case the order of loading might effect something. 

But no. 





On Sunday, January 10, 2016 at 5:59:14 AM UTC-5, Jony Hudson wrote:
>
> This is probably just a copy and paste problem, rather than the solution 
> to your real problem, but ... the namespace declaration you've got in your 
> OP is missing a couple of closing ).
>
>
> Jony
>
> On Sunday, 10 January 2016 07:28:00 UTC, Laws wrote:
>>
>> I've been staring at this for awhile, and moving it around, and re-typing 
>> it, without seeing what the real error is. 
>>
>> I have a file called server.clj which includes this at the top in its 
>> namespace declaration: 
>>
>> (ns salesvoice.server
>>   (:require
>>[salesvoice.query :as query]
>>
>>
>> In query.clj, I have this: 
>>
>>
>> (defn make-response
>>   [company-name outputSpeech-text]
>>   {"version"  "1.0"
>>"sessionAttributes"  {
>>  "company-name"  company-name
>>  "user-id" "user-id"
>>  }
>>"response"  {
>> "outputSpeech"  {
>>  "type"  "PlainText"
>>  "text"  outputSpeech-text
>>  }
>> "card"  {
>>  "type"  "Simple"
>>  "title"  (str "Sales Report for " company-name)
>>  "content"  outputSpeech-text
>>  } 
>> "reprompt"  {
>>  "outputSpeech"  {
>>       "type"  "PlainText"
>>   "text"  "Can I help you 
>> with anything else?"
>>   }
>>  }
>> "shouldEndSession"  true
>> }
>>})
>>
>>
>> When I type "lein uberjar" at the command line I get: 
>>
>>
>> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
>> declaration make-response should be a vector, compiling:(server.clj:1:1)
>>
>> The parameter declaration for make-response is a vector. I am not clear 
>> why I am getting this error. 
>>
>> Things I tried:
>>
>> 1.) moving this around in the file. It had been in the middle of 
>> query.clj, but I moved it to the top, its now the first function defined in 
>> that file
>>
>> 2.) re-typing the parameter declaration
>>
>> 3.) looking for other functions that have the same name, but grep shows 
>> this is the only declaration
>>
>> So what could the real issue be? 
>>
>> Also, why does the error seem to show up when server.clj is including 
>> query.clj. Shouldn't the error appear when query.clj is compiled? 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>

-- 
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/d/optout.


Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread James Elliott
Ah, but it actually does make sense now!

> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
declaration make-response should be a vector, compiling:(server.clj:1:1)

The compiler is complaining about finding "(make-response"… where it was 
looking for a parameter declaration vector in the defn for 
get-stop-response.

If you look further along in the stack trace, you may even find the line 
number in the file where it was trying to compile get-stop-response.

On Sunday, January 10, 2016 at 11:28:17 AM UTC-6, Laws wrote:
>
> Ah, finally found it:
>
> (defn get-stop-response
>   (make-response "No company specified" "Session ended" true))
>
>
> I am surprised that the error was for "make-response" and not 
> "get-stop-response". It is "get-stop-response" where I forgot the parameter 
> declaration. 
>
>
>
> On Sunday, January 10, 2016 at 12:25:57 PM UTC-5, Laws wrote:
>>
>> The implication, as I read it, is that there is some place where I do 
>> something like this: 
>>
>> response-in-amazon-format (make-response company-name 
>> outputSpeech-text false)]
>>
>> In some other function, and the compiler feels that I am defining a new 
>> arity for that other function? But then I would expect to see the name of 
>> the other function.
>>
>>
>> On Sunday, January 10, 2016 at 2:52:48 AM UTC-5, James Elliott wrote:
>>>
>>> That is puzzling indeed. There doesn’t seem to be anything wrong with 
>>> the function itself, as you say. I can evaluate it and run it.
>>>
>>> There must be some other element of your environment which you have not 
>>> shared here which is throwing sand in the gears.
>>>
>>> On Sunday, January 10, 2016 at 1:28:00 AM UTC-6, Laws wrote:
>>>>
>>>> I've been staring at this for awhile, and moving it around, and 
>>>> re-typing it, without seeing what the real error is. 
>>>>
>>>> I have a file called server.clj which includes this at the top in its 
>>>> namespace declaration: 
>>>>
>>>> (ns salesvoice.server
>>>>   (:require
>>>>[salesvoice.query :as query]
>>>>
>>>>
>>>> In query.clj, I have this: 
>>>>
>>>>
>>>> (defn make-response
>>>>   [company-name outputSpeech-text]
>>>>   {"version"  "1.0"
>>>>"sessionAttributes"  {
>>>>  "company-name"  company-name
>>>>  "user-id" "user-id"
>>>>  }
>>>>"response"  {
>>>> "outputSpeech"  {
>>>>  "type"  "PlainText"
>>>>  "text"  outputSpeech-text
>>>>  }
>>>> "card"  {
>>>>  "type"  "Simple"
>>>>          "title"  (str "Sales Report for " company-name)
>>>>  "content"  outputSpeech-text
>>>>  } 
>>>> "reprompt"  {
>>>>  "outputSpeech"  {
>>>>   "type"  "PlainText"
>>>>   "text"  "Can I help you 
>>>> with anything else?"
>>>>   }
>>>>  }
>>>> "shouldEndSession"  true
>>>> }
>>>>})
>>>>
>>>>
>>>> When I type "lein uberjar" at the command line I get: 
>>>>
>>>>
>>>> Exception in thread "main" java.lang.IllegalArgumentException: 
>>>> Parameter declaration make-response should be a vector, 
>>>> compiling:(server.clj:1:1)
>>>>
>>>> The parameter declaration for make-response is a vector. I am not clear 
>>>> why I am getting this error. 
>>>>
>>>> Things I tried:
>>>>
>>>> 1.) moving this around in the file. It had been in the middle of 
>>>> query.clj, but I moved it to the top, its now the first function defined 
>>>> in 
>>>> that file
>>>>
>>>> 2.) re-typing the parameter declaration
>>>>
>>>> 3.) looking for other functions that have the same name, but grep shows 
>>>> this is the only declaration
>>>>
>>>> So what could the real issue be? 
>>>>
>>>> Also, why does the error seem to show up when server.clj is including 
>>>> query.clj. Shouldn't the error appear when query.clj is compiled? 
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>

-- 
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/d/optout.


Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-09 Thread Laws
And yes, I did try running "lein clean".


On Sunday, January 10, 2016 at 2:28:00 AM UTC-5, Laws wrote:
>
> I've been staring at this for awhile, and moving it around, and re-typing 
> it, without seeing what the real error is. 
>
> I have a file called server.clj which includes this at the top in its 
> namespace declaration: 
>
> (ns salesvoice.server
>   (:require
>[salesvoice.query :as query]
>
>
> In query.clj, I have this: 
>
>
> (defn make-response
>   [company-name outputSpeech-text]
>   {"version"  "1.0"
>"sessionAttributes"  {
>  "company-name"  company-name
>  "user-id" "user-id"
>  }
>"response"  {
> "outputSpeech"  {
>  "type"  "PlainText"
>  "text"  outputSpeech-text
>  }
> "card"  {
>  "type"  "Simple"
>  "title"  (str "Sales Report for " company-name)
>  "content"  outputSpeech-text
>  } 
> "reprompt"  {
>  "outputSpeech"  {
>   "type"  "PlainText"
>   "text"  "Can I help you with 
> anything else?"
>   }
>  }
> "shouldEndSession"  true
> }
>})
>
>
> When I type "lein uberjar" at the command line I get: 
>
>
> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
> declaration make-response should be a vector, compiling:(server.clj:1:1)
>
> The parameter declaration for make-response is a vector. I am not clear 
> why I am getting this error. 
>
> Things I tried:
>
> 1.) moving this around in the file. It had been in the middle of 
> query.clj, but I moved it to the top, its now the first function defined in 
> that file
>
> 2.) re-typing the parameter declaration
>
> 3.) looking for other functions that have the same name, but grep shows 
> this is the only declaration
>
> So what could the real issue be? 
>
> Also, why does the error seem to show up when server.clj is including 
> query.clj. Shouldn't the error appear when query.clj is compiled? 
>
>
>
>
>
>
>
>
>
>

-- 
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/d/optout.


java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-09 Thread Laws
I've been staring at this for awhile, and moving it around, and re-typing 
it, without seeing what the real error is. 

I have a file called server.clj which includes this at the top in its 
namespace declaration: 

(ns salesvoice.server
  (:require
   [salesvoice.query :as query]


In query.clj, I have this: 


(defn make-response
  [company-name outputSpeech-text]
  {"version"  "1.0"
   "sessionAttributes"  {
 "company-name"  company-name
 "user-id" "user-id"
 }
   "response"  {
"outputSpeech"  {
 "type"  "PlainText"
 "text"  outputSpeech-text
 }
"card"  {
 "type"  "Simple"
 "title"  (str "Sales Report for " company-name)
 "content"  outputSpeech-text
 } 
"reprompt"  {
 "outputSpeech"  {
  "type"  "PlainText"
  "text"  "Can I help you with 
anything else?"
      }
     }
    "shouldEndSession"  true
}
   })


When I type "lein uberjar" at the command line I get: 


Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
declaration make-response should be a vector, compiling:(server.clj:1:1)

The parameter declaration for make-response is a vector. I am not clear why 
I am getting this error. 

Things I tried:

1.) moving this around in the file. It had been in the middle of query.clj, 
but I moved it to the top, its now the first function defined in that file

2.) re-typing the parameter declaration

3.) looking for other functions that have the same name, but grep shows 
this is the only declaration

So what could the real issue be? 

Also, why does the error seem to show up when server.clj is including 
query.clj. Shouldn't the error appear when query.clj is compiled? 









-- 
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/d/optout.


Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-09 Thread James Elliott
That is puzzling indeed. There doesn’t seem to be anything wrong with the 
function itself, as you say. I can evaluate it and run it.

There must be some other element of your environment which you have not 
shared here which is throwing sand in the gears.

On Sunday, January 10, 2016 at 1:28:00 AM UTC-6, Laws wrote:
>
> I've been staring at this for awhile, and moving it around, and re-typing 
> it, without seeing what the real error is. 
>
> I have a file called server.clj which includes this at the top in its 
> namespace declaration: 
>
> (ns salesvoice.server
>   (:require
>[salesvoice.query :as query]
>
>
> In query.clj, I have this: 
>
>
> (defn make-response
>   [company-name outputSpeech-text]
>   {"version"  "1.0"
>"sessionAttributes"  {
>  "company-name"  company-name
>  "user-id" "user-id"
>  }
>"response"  {
> "outputSpeech"  {
>  "type"  "PlainText"
>  "text"  outputSpeech-text
>  }
> "card"  {
>  "type"  "Simple"
>  "title"  (str "Sales Report for " company-name)
>  "content"  outputSpeech-text
>  } 
> "reprompt"  {
>  "outputSpeech"  {
>   "type"  "PlainText"
>   "text"  "Can I help you with 
> anything else?"
>   }
>  }
> "shouldEndSession"  true
> }
>})
>
>
> When I type "lein uberjar" at the command line I get: 
>
>
> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
> declaration make-response should be a vector, compiling:(server.clj:1:1)
>
> The parameter declaration for make-response is a vector. I am not clear 
> why I am getting this error. 
>
> Things I tried:
>
> 1.) moving this around in the file. It had been in the middle of 
> query.clj, but I moved it to the top, its now the first function defined in 
> that file
>
> 2.) re-typing the parameter declaration
>
> 3.) looking for other functions that have the same name, but grep shows 
> this is the only declaration
>
> So what could the real issue be? 
>
> Also, why does the error seem to show up when server.clj is including 
> query.clj. Shouldn't the error appear when query.clj is compiled? 
>
>
>
>
>
>
>
>
>
>

-- 
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/d/optout.


Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-09 Thread Laws
I would guess that I was dealing with some variant of this: 

http://dev.clojure.org/jira/browse/CLJ-1629

but I can not figure out how my function is malformed. 


On Sunday, January 10, 2016 at 2:28:00 AM UTC-5, Laws wrote:
>
> I've been staring at this for awhile, and moving it around, and re-typing 
> it, without seeing what the real error is. 
>
> I have a file called server.clj which includes this at the top in its 
> namespace declaration: 
>
> (ns salesvoice.server
>   (:require
>[salesvoice.query :as query]
>
>
> In query.clj, I have this: 
>
>
> (defn make-response
>   [company-name outputSpeech-text]
>   {"version"  "1.0"
>"sessionAttributes"  {
>  "company-name"  company-name
>  "user-id" "user-id"
>  }
>"response"  {
> "outputSpeech"  {
>  "type"  "PlainText"
>  "text"  outputSpeech-text
>  }
> "card"  {
>  "type"  "Simple"
>  "title"  (str "Sales Report for " company-name)
>  "content"  outputSpeech-text
>  } 
> "reprompt"  {
>  "outputSpeech"  {
>   "type"  "PlainText"
>   "text"  "Can I help you with 
> anything else?"
>   }
>  }
> "shouldEndSession"  true
> }
>})
>
>
> When I type "lein uberjar" at the command line I get: 
>
>
> Exception in thread "main" java.lang.IllegalArgumentException: Parameter 
> declaration make-response should be a vector, compiling:(server.clj:1:1)
>
> The parameter declaration for make-response is a vector. I am not clear 
> why I am getting this error. 
>
> Things I tried:
>
> 1.) moving this around in the file. It had been in the middle of 
> query.clj, but I moved it to the top, its now the first function defined in 
> that file
>
> 2.) re-typing the parameter declaration
>
> 3.) looking for other functions that have the same name, but grep shows 
> this is the only declaration
>
> So what could the real issue be? 
>
> Also, why does the error seem to show up when server.clj is including 
> query.clj. Shouldn't the error appear when query.clj is compiled? 
>
>
>
>
>
>
>
>
>
>

-- 
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/d/optout.