When using the following code, I get an error:

```
$page = $_SERVER['REQUEST_URI'];
Settings::$api_key = $API_KEY_SECRET;
$marketplace = Marketplace::mine();
if ($page == '/')
{
  // do nothing
} 
elseif ($page == '/buyer') {
if (isset($_POST['uri']) and isset($_POST['email_address'])) {
    // create in balanced
    $email_address = $_POST['email_address'];
    $card_uri = $_POST['uri'];
    try {
        echo create_buyer($email_address, $card_uri)->uri;
        return;
    } catch (Exception $e) {
        echo $e->getMessage();
        return;
    }
}
}

function create_buyer($email_address, $card_uri) {
$marketplace = Marketplace::mine();
try {
    # new buyer
    $buyer = $marketplace->createBuyer(
        $email_address,
        $card_uri);
}
catch (Exception $e) {
    if ($e->category_code == 'duplicate-email-address') {
        # oops, account for $email_address already exists so just add the card
        $buyer = $marketplace
            ->accounts
            ->query()
            ->filter(Account::$f->email_address->eq($email_address))
            ->one();
        $buyer->addCard($card_uri);
    }
    else {
        throw $e;
    }     
}
return $buyer;
 }

```

I am getting this error:

> 
> Fatal error: Uncaught exception 'NoResultFound' in /var/www/html/site/balancepayment/Balanced/Core/Query.php:134 Stack trace: #0 /var/www/html/site/balancepayment/Balanced/Marketplace.php(48): Query->one() #1 /var/www/html/site/balancepayment/index.php(16): Marketplace::mine() #2 {main} thrown in /var/www/html/site/balancepayment/Balanced/Core/Query.php on line 134
> 
> 
>