# Dfx deploy --argument does not infer Candid types

**URL:** https://forum.dfinity.org/t/dfx-deploy-argument-does-not-infer-candid-types/21323
**Category:** Developers
**Created:** [July 12, 2023, 11:29pm UTC](https://forum.dfinity.org/t/dfx-deploy-argument-does-not-infer-candid-types/21323 "2023-07-12T23:29:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)
#### Post date: [July 12, 2023, 11:29pm UTC](https://forum.dfinity.org/t/dfx-deploy-argument-does-not-infer-candid-types/21323/1 "2023-07-12T23:29:32Z")

</div>

If you deploy a Rust canister (Azle/Kybra included) with an “empty” candid file:

```auto
service : () -> {
}

```

but your canister accepts `init` or `post_upgrade` params, then deploy will fail because dfx doesn’t seem to detect or encode the argument. Why is this?

dfx seems to do a lot of Candid inference in other places such as during `dfx canister call` method calls. Having an empty Candid file like above doesn’t break all method calls, so shouldn’t `dfx deploy --argument` work similarly?

This is causing issues in Kybra because of some complicated build issues we’re having around the Candid situation on the IC for Rust/custom canisters. Just bringing it up.

---

<div class="post-metadata">

### Author: ![chenyan](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@chenyan](https://forum.dfinity.org/u/chenyan)
#### Post date: [July 13, 2023, 6:08pm UTC](https://forum.dfinity.org/t/dfx-deploy-argument-does-not-infer-candid-types/21323/2 "2023-07-13T18:08:26Z")

</div>

If you want to bypass the type check, use `dfx canister install --wasm a.wasm --argument '(init args)'`
