<p>The error is pretty clear:</p>
<blockquote>
<p>Invalid address for this network or malformed address format</p>
</blockquote>
<p>Can you show us more of your code?</p>

CC BY-SA 4.0
2023-09-27T10:01:54.790Z
thanks for quick reply. I found the error.
Mik_A
CC BY-SA 4.0
2023-09-27T07:33:23.583Z
2023-09-27T07:33:23.583Z
Marek Mahut - StakeNuts
<p>I get <code>blockfrost.utils.ApiError: {'status_code': 400, 'error': 'Bad Request', 'message': 'Invalid address for this network or malformed address format.'}</code>
when using pycardano and this code</p>
<pre><code># Create a BlockFrost chain context
context = BlockFrostChainContext(
    &quot;Project_id&quot;, base_url=ApiUrls.mainnet.value)
</code></pre>
<p>Same problem if I use API url directly</p>
<p>Is it a Pycardano issue or blockfrost?</p>

<transaction><blockfrost><python>
Blockfrost API error with pycardano
# Blockfrost API error with pycardano

(Asked by: username_0 on 2023-09-27)

I get blockfrost.utils.ApiError: {'status_code': 400, 'error': 'Bad Request', 'message': 'Invalid address for this network or malformed address format.'}
when using pycardano and this code
# Create a BlockFrost chain context
context = BlockFrostChainContext(
    "Project_id", base_url=ApiUrls.mainnet.value)

Same problem if I use API url directly
Is it a Pycardano issue or blockfrost?

**Tags:** transaction, blockfrost, python

---

## 1 answers

### Answer by username_1 on 2023-09-27. Score: 0

The error is pretty clear:

> Invalid address for this network or malformed address format

Can you show us more of your code?

> **Comments:**
> **username_0**: thanks for quick reply. I found the error.  

---

