<p>It appears you ended up calling <code>head</code> on an empty list <code>[]</code>? That can not work as there is no element to take from an empty list. <code>head</code> only works on lists with at least one element, and fails for the empty list.</p>

CC BY-SA 4.0
2022-01-16T13:46:43.200Z
2022-01-16T13:46:43.200Z
angerman
<pre><code>Command failed: transaction build  Error:
The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.
Caused by: [ (force (builtin headList)) (con list (data) []) ]
Script debugging logs: 
</code></pre>

<plutus>
How to resolve the Following Error.?
# How to resolve the Following Error.?

(Asked by: username_0 on 2022-01-15)

Command failed: transaction build  Error:
The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.
Caused by: [ (force (builtin headList)) (con list (data) []) ]
Script debugging logs:

**Tags:** plutus

---

## 1 answers

### Answer by username_1 on 2022-01-16. Score: 1

It appears you ended up calling `head` on an empty list `[]`? That can not work as there is no element to take from an empty list. `head` only works on lists with at least one element, and fails for the empty list.


---

