To be compatible with Testnet, but incompatible with Namecoin and chains that use its proof-of-work format, remove or comment out these lines in Abe/deserialize.py, lines 175-176 in the latest commit:
if d['version'] & (1 << 8):
d['auxpow'] = parse_AuxPow(vds)
To be compatible with both, until I have a better fix, I suggest you run this query:
SELECT DISTINCT c.chain_name, b.block_version
FROM block b
JOIN chain_candidate cc ON (b.block_id = cc.block_id)
JOIN chain c ON (cc.chain_id = c.chain_id)
You will see something like:
chain_name | block_version
------------+---------------
NcTestnet | 65537
NcTestnet | 1
Namecoin | 1
Namecoin | 65537
Namecoin | 65793
Bitcoin | 1
NcTestnet | 65793
Make a list of the values under block_version that belongs to a network with Namecoin-style merged mining. For the above output, the list would be (1, 65537, 65793) corresponding to Namecoin and NcTestnet. Then add " and d['version'] in (LIST)" after "d['version'] & (1 << " on line 175, e.g.:
if (d['version'] & (1 << 8)) and d['version'] in (1, 65537, 65793):
d['auxpow'] = parse_AuxPow(vds)