Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument Errors #77

Closed
ckuetbach opened this issue Mar 29, 2020 · 7 comments · Fixed by #80
Closed

Argument Errors #77

ckuetbach opened this issue Mar 29, 2020 · 7 comments · Fixed by #80

Comments

@ckuetbach
Copy link

Some commands gives ArgumentErrors

~# kovid eu

Traceback (most recent call last):
        11: from /usr/local/bin/kovid:23:in `<main>'
        10: from /usr/local/bin/kovid:23:in `load'
         9: from /var/lib/gems/2.5.0/gems/kovid-0.4.10/exe/kovid:4:in `<top (required)>'
         8: from /var/lib/gems/2.5.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
         7: from /var/lib/gems/2.5.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
         6: from /var/lib/gems/2.5.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
         5: from /var/lib/gems/2.5.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
         4: from /var/lib/gems/2.5.0/gems/kovid-0.4.10/lib/kovid/cli.rb:62:in `eu'
         3: from /var/lib/gems/2.5.0/gems/kovid-0.4.10/lib/kovid.rb:14:in `eu_aggregate'
         2: from /var/lib/gems/2.5.0/gems/kovid-0.4.10/lib/kovid/request.rb:26:in `eu_aggregate'
         1: from /var/lib/gems/2.5.0/gems/kovid-0.4.10/lib/kovid/request.rb:188:in `aggregator'
/var/lib/gems/2.5.0/gems/kovid-0.4.10/lib/kovid/request.rb:188:in `merge': wrong number of arguments (given 26, expected 1) (ArgumentError)
@havenwood
Copy link

You're running into this with Ruby 2.5 since it wasn't until Ruby 2.6 that Hash#merge got support for multiple arguments. The Hash#merge usage here just needs to be rewritten for Ruby 2.5 support.

@ckuetbach
Copy link
Author

Just need to figure out, how to update ruby to 2.6 within Ubuntu 18.04 LTS within Windows WSL :)

@siaw23-retired
Copy link
Collaborator

@ckuetbach A temporary fix will be to upgrade your Ruby to >= 2.6.0 while we work on rewriting the logic behind this.

You can use RVM in Ubuntu I think. Then you can switch versions easily.

Do you have RVM?

@ckuetbach
Copy link
Author

ckuetbach commented Mar 29, 2020

I just installed it and ruby 2.7, and now it runs, BUT:

~$ kovid histogram de 3.20
+-------------------------------+
|              ❗️               |
+-------------------------------+
| No infections for this month. |
+-------------------------------+

Sources:
 * JHU CSSE GISand Data
 * https://www.worldometers.info/coronavirus/

I really would like this nummber were true.

@siaw23-retired
Copy link
Collaborator

You'd want to be doing this instead

kovid histogram germany 3.20

@siaw23-retired
Copy link
Collaborator

y-axis = number of cases
x-axis = dates in the given month

@ckuetbach
Copy link
Author

Thanks a lot, I was confusing the parmeter.

kovid check de works like kovid check germany

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants