cheald / srp-bill-calculator

Compute your power bill on APS & SRP's various billing plans
MIT License
32 stars 8 forks source link

TypeError when attempting to run #5

Closed dramich closed 6 years ago

dramich commented 6 years ago

I get the following error when attempting to run:

ruby power.rb 657-407-007-Hourly-20180601-20180719.csv -p srp
Traceback (most recent call last):
    3: from power.rb:74:in `<main>'
    2: from /Users/ramich/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/csv.rb:1272:in `open'
    1: from /Users/ramich/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/csv.rb:1272:in `open'
/Users/ramich/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/csv.rb:1272:in `initialize': no implicit conversion of nil into String (TypeError)

On mac High Sierra Tried both ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17] and ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]

dramich commented 6 years ago

I missed the -f flag when running. Perhaps a more graceful error message would be helpful. Thanks for the tool.

cheald commented 6 years ago

Ah, sorry about that. I've added a friendlier error message!