View bootstrap trees with augur export

I want to build and view a bootstrap tree.
Instead of augur tree I used iqtree2, then on the resulting tree I applied augur refine, augur ancestral, augur translate and augur traits.
When building a normal (not bootstrap) tree, everything was OK.
With the bootstrap tree, everything went smoothly, but augur export raised the following error message:

ERROR: cannot find branch length information for NODE_00010120.00 #NB this is an internal node on the tree

Traceback (most recent call last):
  File "/usr/bin/miniconda3/envs/nextstrain/bin/augur", line 8, in <module>
    sys.exit(main())
  File "/usr/bin/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/__main__.py", line 10, in main
    return augur.run( argv[1:] )
  File "/usr/bin/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/__init__.py", line 74, in run
    return args.__command__.run(args)
  File "/usr/bin/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/export.py", line 22, in run
    return run_v2(args)
  File "/usr/bin/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/export_v2.py", line 866, in run_v2
    data_json["tree"] = convert_tree_to_json_structure(T.root, node_attrs)
  File "/usr/bin/miniconda3/envs/nextstrain/lib/python3.6/site-packages/augur/export_v2.py", line 84, in convert_tree_to_json_structure
    node_struct["children"].append(convert_tree_to_json_structure(child, metadata, div=cdiv))
UnboundLocalError: local variable 'cdiv' referenced before assignment

The commands I use:

iqtree2 -s masked_alignment.fasta -m GTR -T 70 -fast -redo -b 100

augur refine --tree tree_raw.nwk --alignment masked_alignment.fasta --metadata augur_filtered.metadata.tsv --output-tree tree.nwk --output-node-data branch_lengths.json --timetree --coalescent skyline --date-confidence --no-covariance --date-inference marginal --clock-filter-iqd 4 --clock-rate 0.0008 --clock-std-dev 0.0004  > augur.refine.log 2> augur.refine.err

augur ancestral --tree tree.nwk --alignment masked_alignment.fasta --output-node-data nt_muts.json --inference joint > augur.ancestral.log 2> augur.ancestral.err

augur translate --tree tree.nwk --ancestral-sequences nt_muts.json --reference-sequence config/MN908947.3.genbank --output-node-data aa_muts.json --alignment-output aligned_translated_%GENE.faa > augur.translate.log 2> augur.translate.err

augur traits --tree tree.nwk --metadata augur_filtered.metadata.tsv --output-node-data traits.json --columns region country --confidence > augur.traits.log 2> augur.traits.err

augur export v2 --tree tree.nwk --title Title --metadata augur_filtered.metadata.tsv --node-data branch_lengths.json traits.json nt_muts.json aa_muts.json --colors colors.tsv --lat-longs config/long_lat_ext.tsv --auspice-config config/auspice_config.json --output auspice/iqtree2_bs100.json --maintainers XY --build-url 0.0.0.0 --description config/description.md --panels tree map entropy frequencies > augur.export.log 2> augur.export.err

This is difficult to answer without seeing tree_raw.nwk and possibly branch_lengths.json. Do these files contain all the branch lengths necessary to compute divergence? Could you compare them when you with and without bootstrap?

@meher I uploaded the raw tree, the refined tree and the branch lengths for both trees with and without bootstrap to here:
https://drive.google.com/drive/folders/1b4HF13-JStlXfEcmAapfeb69lD4C8QoH?usp=sharing
I really appreciate your help.

The problem seems to be that bootstrap values are not parsed correctly by Biophyton when internal nodes have names. This results in node names like NODE_000358854.00 where the last 5 digits stem from the bootstrap confidence values. This could be fixed with a script that sanitizes this, but i am afraid there is no easy fix. it also depends a lot on what you are planning to do with these bootstrap values…