From 1fe4dc57b18e4dc63748f41ef029f5376d560de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Galv=C3=A1nek?= Date: Thu, 11 Jun 2026 17:09:36 +0200 Subject: [PATCH 1/2] fix: handle missing or null values in NftCollectionIntervalStats constructor --- blockapi/v2/models.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/blockapi/v2/models.py b/blockapi/v2/models.py index 9a69fdc..3deee92 100644 --- a/blockapi/v2/models.py +++ b/blockapi/v2/models.py @@ -906,12 +906,16 @@ def from_api( average_price: str, ) -> 'NftCollectionIntervalStats': return cls( - volume=Decimal(volume), - volume_diff=Decimal(volume_diff), - volume_percent_change=Decimal(volume_percent_change), + volume=Decimal(volume) if volume else Decimal('0'), + volume_diff=Decimal(volume_diff) if volume_diff else Decimal('0'), + volume_percent_change=( + Decimal(volume_percent_change) + if volume_percent_change + else Decimal('0') + ), sales_count=int(sales_count) if sales_count else 0, sales_diff=int(Decimal(sales_diff)) if sales_diff else 0, - average_price=Decimal(average_price), + average_price=Decimal(average_price) if average_price else Decimal('0'), ) From e58b3573d647e183a63e05624b16a7dbf84d275f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Galv=C3=A1nek?= Date: Fri, 12 Jun 2026 18:55:11 +0200 Subject: [PATCH 2/2] fix: add aiohttp version restriction due to vcrpy incompatibility --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 3e5e19b..5f4c122 100644 --- a/setup.py +++ b/setup.py @@ -33,6 +33,8 @@ 'attrs>=17.4.0,<23.0.0', 'solders>=0.22.0', 'base58>=2.1.0', + # vcrpy incompatible with 3.14, remove once vcrpy>8.1.1 is out + 'aiohttp<3.14', ], url="https://github.com/crypkit/blockapi", )