diff --git a/bitcoinlib/services/services.py b/bitcoinlib/services/services.py index 82d96d4f..48b6cc79 100644 --- a/bitcoinlib/services/services.py +++ b/bitcoinlib/services/services.py @@ -374,7 +374,7 @@ def gettransactions(self, address, after_txid='', limit=MAX_TRANSACTIONS): if txs is False: raise ServiceError("Error when retrieving transactions from service provider") for tx in txs: - if not tx.date.tzinfo: + if tx.date and not tx.date.tzinfo: tx.date = tx.date.replace(tzinfo=timezone.utc) # Store transactions and address in cache