<p>I have instead built the playground using the <code>plutus-apps</code> tag referenced in week 1 of the <code>plutus-pioneer-program</code>. This solved the issue although I do not know what the problem was with the tag I was using previously (v2022-04-06).</p>
<p>The <code>plutus-apps</code> tag that fixed it is <code>41149926c108c71831cfe8d244c83b0ee4bf5c8a</code>.</p>
<p>The way I ended up trying this solution was that I tried to run the EnglishAuction contract in week01 content, and I encountered the same error so I then understood that the problem did not explicitly lie in my contract, rather the interaction between the contract and that version of the playground.</p>

CC BY-SA 4.0
2022-09-25T07:38:33.807Z
2022-09-25T07:38:33.807Z
NaeriKailash
<p>You could try</p>
<pre><code>tkSymbol :: CurrencySymbol
tkSymbol = currencySymbol &quot;8d803516132f6fb8ddfcf168065886bf44ecc9e0023b570963b4bac8&quot;

elysiumtitan0 :: KnownCurrency
elysiumtitan0 = KnownCurrency (fromSymbol tkSymbol) &quot;Token&quot; ( (TokenName &quot;ElysiumTitan0&quot;) :| [])


elysiumtitan1 :: KnownCurrency
elysiumtitan1 = KnownCurrency (fromSymbol tkSymbol) &quot;Token&quot; ( (TokenName &quot;ElysiumTitan1&quot;) :| [])

...

</code></pre>

CC BY-SA 4.0
2022-09-22T01:51:32.027Z
Unfortunately still getting (nearly) the same error, different bytes 
```Contract instance stopped with error: "WalletContractError (ToCardanoError (Tag \"toCardanoPolicyId\" (Tag \"56 bytes\" DeserialisationError)))" ]```
NaeriKailash
CC BY-SA 4.0
2022-09-22T02:16:42.083Z
we can start to trace the error from here [toCardanoPolicyId](https://github.com/input-output-hk/plutus-apps/blob/f592a7b2a97e3e2a318f5585661c5ada1fe9bd43/plutus-ledger/src/Ledger/Tx/CardanoAPI.hs#L648-L649), but i'm not sure which on call to `toCardanoPolicyId`
You can try this [way](https://github.com/input-output-hk/plutus-apps/blob/main/plutus-use-cases/src/Plutus/Contracts/Uniswap/Trace.hs#L66-L88) to generate some token for offchain emulator trace
Kỳ Anh
CC BY-SA 4.0
2022-09-22T03:23:52.963Z
I'm having trouble importing the `Plutus.Contracts` module even though its showing in the docs for my version, I'll see if I can get it working and get back to you, thanks :)
NaeriKailash
CC BY-SA 4.0
2022-09-22T01:36:28.837Z
2022-09-22T01:36:28.837Z
Kỳ Anh
<p>Plutus-apps v2022-04-06</p>
<p>My smart contract compiles successfully however when i run the simulator i get this error</p>
<pre><code>Contract instance stopped with error: &quot;WalletContractError (ToCardanoError (Tag \&quot;toCardanoPolicyId\&quot; (Tag \&quot;1 bytes\&quot; DeserialisationError)))&quot; ]
</code></pre>
<p>My plutus code is here: <a href="https://github.com/naeri-kailash/elysium-plutus/blob/master/src/Cardano/PlutusExample/Trade.hs" rel="nofollow noreferrer">https://github.com/naeri-kailash/elysium-plutus/blob/master/src/Cardano/PlutusExample/Trade.hs</a></p>
<p>I have read another issue where someone got this error but their solution (CurrencySymbol needed to be changed to a policyID i believe - mine is already a policyID) was not relevant to me. Could I please have some guidance on how to go about debugging this error?</p>
<p>Much appreciated</p>

CC BY-SA 4.0
2022-09-20T05:50:31.590Z
It would be helpful if you could share the plutus code to reproduce this issue. This way someone could try to help you better.
eddex
CC BY-SA 4.0
2022-09-20T05:50:59.563Z
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Community
CC BY-SA 4.0
2022-09-21T04:06:03.757Z
Thank you @eddex I have added the plutus contract
NaeriKailash
<smart-contract><plutus-playground><haskell>
Plutus playground error when running simulator: WalletContractError ToCardanoError (Tag \"toCardanoPolicyId\" (Tag \"1 bytes\" DeserialisationError))
# Plutus playground error when running simulator: WalletContractError ToCardanoError (Tag \"toCardanoPolicyId\" (Tag \"1 bytes\" DeserialisationError))

(Asked by: username_0 on 2022-09-19)

Plutus-apps v2022-04-06
My smart contract compiles successfully however when i run the simulator i get this error
Contract instance stopped with error: "WalletContractError (ToCardanoError (Tag \"toCardanoPolicyId\" (Tag \"1 bytes\" DeserialisationError)))" ]

My plutus code is here: https://github.com/naeri-kailash/elysium-plutus/blob/master/src/Cardano/PlutusExample/Trade.hs
I have read another issue where someone got this error but their solution (CurrencySymbol needed to be changed to a policyID i believe - mine is already a policyID) was not relevant to me. Could I please have some guidance on how to go about debugging this error?
Much appreciated

**Tags:** smart-contract, plutus-playground, haskell
> **Comments:**
> **username_1**: It would be helpful if you could share the plutus code to reproduce this issue. This way someone could try to help you better.  
> **username_2**: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.  
> **username_0**: Thank you @eddex I have added the plutus contract  

---

## 2 answers

### Answer by username_0 on 2022-09-25. Score: 0 | Accepted answer

I have instead built the playground using the `plutus-apps` tag referenced in week 1 of the `plutus-pioneer-program`. This solved the issue although I do not know what the problem was with the tag I was using previously (v2022-04-06).

The `plutus-apps` tag that fixed it is `41149926c108c71831cfe8d244c83b0ee4bf5c8a`.

The way I ended up trying this solution was that I tried to run the EnglishAuction contract in week01 content, and I encountered the same error so I then understood that the problem did not explicitly lie in my contract, rather the interaction between the contract and that version of the playground.


---

### Answer by username_3 on 2022-09-22. Score: 0

You could try
tkSymbol :: CurrencySymbol
tkSymbol = currencySymbol "8d803516132f6fb8ddfcf168065886bf44ecc9e0023b570963b4bac8"

elysiumtitan0 :: KnownCurrency
elysiumtitan0 = KnownCurrency (fromSymbol tkSymbol) "Token" ( (TokenName "ElysiumTitan0") :| [])


elysiumtitan1 :: KnownCurrency
elysiumtitan1 = KnownCurrency (fromSymbol tkSymbol) "Token" ( (TokenName "ElysiumTitan1") :| [])

...

> **Comments:**
> **username_0**: Unfortunately still getting (nearly) the same error, different bytes  ```Contract instance stopped with error: "WalletContractError (ToCardanoError (Tag \"toCardanoPolicyId\" (Tag \"56 bytes\" DeserialisationError)))" ]```  
> **username_3**: we can start to trace the error from here [toCardanoPolicyId](https://github.com/input-output-hk/plutus-apps/blob/f592a7b2a97e3e2a318f5585661c5ada1fe9bd43/plutus-ledger/src/Ledger/Tx/CardanoAPI.hs#L648-L649), but i'm not sure which on call to `toCardanoPolicyId` You can try this [way](https://github.com/input-output-hk/plutus-apps/blob/main/plutus-use-cases/src/Plutus/Contracts/Uniswap/Trace.hs#L66-L88) to generate some token for offchain emulator trace  
> **username_0**: I'm having trouble importing the `Plutus.Contracts` module even though its showing in the docs for my version, I'll see if I can get it working and get back to you, thanks :)  

---

