Skip to content
This repository was archived by the owner on May 23, 2022. It is now read-only.

Conversation

zippoxer
Copy link

@zippoxer zippoxer commented Jul 1, 2020

I haven't even finished reading the Quick start and already found what seems like a (broken) legacy example. I quickly found the solution though, and would ❤ to share it!

Problem
Executing this snippet from the Quick start:

> dfx canister call hello greet everyone

Gives:

Invalid argument: Invalid IDL: IDL parser error: Unrecognized token `Id("everyone")` found at 0:8

Why it happens
When executing the dfx canister call command, the default argument type (--type) is idl which is incompatible with the example which tries to pass a string argument without saying it's a string.

I guess the default used to be string in the past?

Solution
This PR appends --type=string to the broken command, and now it's fixed!

The default for `--type` is `idl` which is incompatible with the example which tries to pass a string
@lsgunnlsgunn
Copy link
Contributor

Is is a good catch--our doc escaped from the Zoo a little early! Your fix works for 0.5.7 and earlier, but the --type string setting has been deprecated for the next release (which isn't publicly available just yet).

@lsgunnlsgunn
Copy link
Contributor

Thanks again for your contribution. We hope to have the doc and code back in synch this week, so I'm closing this PR, but please do retest when the latest version is available for download and let us know if you find anything amiss.

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

Successfully merging this pull request may close these issues.

2 participants