Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8445121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:34:45+00:00 2026-06-10T09:34:45+00:00

I am moving from [org.clojure/tools.cli 0.1.0] to 0.2.2, but am getting Exception in thread

  • 0

I am moving from [org.clojure/tools.cli "0.1.0"] to 0.2.2, but am getting

Exception in thread "main" clojure.lang.ArityException: 
Wrong number of args (2) passed to: PersistentVector

at the line beginning with (cli args

(defn parse-opts
  "Using the newer cli library, parses command line args."
  [args]
  (cli args
       ["--ifn1" ".csv input file" :default "benetrak_roster.csv"]
       ["--ifn2" ".csv input file" :default "billing_roster.csv"]
       ["--rpt" ".csv pipe delimited output file" :default "bene_gic_rpt.csv"]
       ["--dump1" "text file report for debug output" :default "dumpfile1.txt"]
       ["--dump2" "text file report for debug output" :default "dumpfile2.txt"]
       ["--debug" "Debug flag for logging." :default 0 :parse-fn #(Integer. %)]))

tools.cli is included like this (:use clojure.tools.cli).

I can’t see what I’m doing wrong, and would appreciate any pointers or help. Thanks.

By the way, I’ve tried the following from looking at examples, and it does not work:

(defn -main 
  [& args]
  (let [[opts args banner]
        (cli args
        ["--ifn1" ".csv input file" :default "benetrak_roster.csv"]
        ["--ifn2" ".csv input file" :default "billing_roster.csv"]
        ["--rpt" ".csv pipe delimited output file" :default "bene_gic_rpt.csv"]
        ["--dump1" "text file report for debug output" :default "dumpfile1.txt"]
        ["--dump2" "text file report for debug output" :default "dumpfile2.txt"]
        ["--debug" "Debug flag for logging." :default 0 :parse-fn #(Integer. %)])
        start-time (str (Date.))]
        .
        .
        .
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:34:46+00:00Added an answer on June 10, 2026 at 9:34 am

    This seems to work:

    (ns test.core
      (:use clojure.tools.cli))
    
    (defn parse-opts
      "Using the newer cli library, parses command line args."
      [args]
      (cli args
           ["--ifn1" ".csv input file" :default "benetrak_roster.csv"]
           ["--ifn2" ".csv input file" :default "billing_roster.csv"]
           ["--rpt" ".csv pipe delimited output file" :default "bene_gic_rpt.csv"]
           ["--dump1" "text file report for debug output" :default "dumpfile1.txt"]
           ["--dump2" "text file report for debug output" :default "dumpfile2.txt"]
           ["--debug" "Debug flag for logging." :default 0 :parse-fn #(Integer. %)]))
    
    test.core> (parse-opts [])
    [{:debug 0, :dump2 "dumpfile2.txt", :dump1 "dumpfile1.txt", :rpt "bene_gic_rpt.csv", :ifn2 "billing_roster.csv", :ifn1 "benetrak_roster.csv"} [] "Usage:\n\n Switches  Default              Desc                              \n --------  -------              ----                              \n --ifn1    benetrak_roster.csv  .csv input file                   \n --ifn2    billing_roster.csv   .csv input file                   \n --rpt     bene_gic_rpt.csv     .csv pipe delimited output file   \n --dump1   dumpfile1.txt        text file report for debug output \n --dump2   dumpfile2.txt        text file report for debug output \n --debug   0                    Debug flag for logging.           \n"]
    test.core> 
    

    Are you sure the error isn’t in whatever you’re passing to parse-opts?

    Also: are you sure you’ve got the right version (and ONLY the right version) of tools.cli in your project.clj?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am moving from Apache 1.3 to Apache 2.063 and am having trouble getting
Moving from the Specs2 to Scalatest I tried using the WordSpec, but with no
Im moving from django to pylons, is there an admin app?
As I am moving from C# to Python, I was wondering if there is
I'm moving from adobe flex to ext js 4, and I noted that in
I am considering moving from Matlab to Python/numpy for data analysis and numerical simulations.
I'm moving from a PHP background into Django development via python, mostly for the
We are moving from WebForms to MVC and and using a lot of jQuery.
I'm developer moving from C# to Java. Heard about new ASP net feature. <%:
I'm slowly moving from MSSQL to PostgreSQL. In MSSQL I could call editing of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.