Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed Apr 29, 2024
1 parent 24c48c1 commit 310f754
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BLOCKFROST_PROJECT_ID=your_project_id
5 changes: 3 additions & 2 deletions src/utils/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from pycardano import Network, OgmiosChainContext, ChainContext, BlockFrostChainContext
import pathlib

assert load_dotenv(
if not load_dotenv(
dotenv_path=pathlib.Path(__file__).parent.parent.parent / ".env"
), "Failed to load .env file"
):
print("Failed to load .env file. If you are getting errors, please copy .env.example to .env and fill in the values.")

blockfrost_project_id = os.getenv("BLOCKFROST_PROJECT_ID", None)

Expand Down

0 comments on commit 310f754

Please sign in to comment.