I'm posting this just in case someone googles for this error.
Error like below happens if you upgrade to 9.48 develop (later master, too) and try to start counterpartyd on testnet.
Reason: starting from a recent update you need to recreate your testnet DB and all Counterparty testnet assets you may have had before (why, it's explained on Github, see closed issues for counterpartyd).
Fix: move your counterpartyd DB (counterpartyd.9.testnet.db) to another directory and restart counterpartyd server on testnet and give counterpartyd 10-15 mins to recreate the DB. (You do not need to delete Bitcoin testnet data).
Traceback (most recent call last):
File "C:\\counterpartyd_build\\dist\\counterpartyd\\counterpartyd.py", line 931, i
n
blocks.reparse(db)
File "C:\\counterpartyd_build\\dist\\counterpartyd\\lib\\blocks.py", line 607, in r
eparse
reinitialise(db, block_index)
File "C:\\counterpartyd_build\\dist\\counterpartyd\\lib\\blocks.py", line 577, in r
einitialise
initialise(db)
File "C:\\counterpartyd_build\\dist\\counterpartyd\\lib\\blocks.py", line 184, in i
nitialise
raise exceptions.DatabaseError('First block in database is not block {}.'.fo
rmat(config.BLOCK_FIRST))
lib.exceptions.DatabaseError: First block in database is not block 310000.