Skip to content

MESSAGE: 'NoneType' object has no attribute 'startswith' (When using precomputed skani sketches) #687

@jolespin

Description

@jolespin

Environment

  • Installed via pip (include the output of pip list)
  • [ X ] Using a conda environment (include the output of conda list && conda list --revisions)
  • Using a Docker container (include the IMAGE ID of the container)
$ conda list && conda list --revisions
# packages in environment at /mnt/efs/miniforge3/envs/gtdbtk-2.6.1:
#
# Name                     Version          Build                 Channel
_libgcc_mutex              0.1              conda_forge           conda-forge
_openmp_mutex              4.5              2_gnu                 conda-forge
bzip2                      1.0.8            hda65f42_8            conda-forge
ca-certificates            2026.1.4         hbd8a1cb_0            conda-forge
colorama                   0.4.6            pyhd8ed1ab_1          conda-forge
dendropy                   5.0.8            pyhdfd78af_1          bioconda
fastani                    1.34             hb66fcc3_7            bioconda
fasttree                   2.2.0            h7b50bb2_1            bioconda
gsl                        2.8              hbf7d49c_1            conda-forge
gtdbtk                     2.6.1            pyh1f0d9b5_2          bioconda
hmmer                      3.4              h503566f_3            bioconda
icu                        78.2             h33c6efd_0            conda-forge
ld_impl_linux-64           2.45             default_hbd61a6d_105  conda-forge
libblas                    3.11.0           5_h4a7cf45_openblas   conda-forge
libcblas                   3.11.0           5_h0358290_openblas   conda-forge
libexpat                   2.7.3            hecca717_0            conda-forge
libffi                     3.5.2            h9ec8514_0            conda-forge
libgcc                     15.2.0           he0feb66_16           conda-forge
libgfortran                15.2.0           h69a702a_16           conda-forge
libgfortran5               15.2.0           h68bc16d_16           conda-forge
libgomp                    15.2.0           he0feb66_16           conda-forge
liblapack                  3.11.0           5_h47877c9_openblas   conda-forge
liblzma                    5.8.2            hb03c661_0            conda-forge
libmpdec                   4.0.0            hb9d3cd8_0            conda-forge
libopenblas                0.3.30           pthreads_h94d23a6_4   conda-forge
libsqlite                  3.51.2           hf4e2dac_0            conda-forge
libstdcxx                  15.2.0           h934c35e_16           conda-forge
libuuid                    2.41.3           h5347b49_0            conda-forge
libzlib                    1.3.1            hb9d3cd8_2            conda-forge
ncurses                    6.5              h2d0b736_3            conda-forge
numpy                      2.4.1            py313hf6604e3_0       conda-forge
openssl                    3.6.0            h26f9b46_0            conda-forge
pip                        25.3             pyh145f28c_0          conda-forge
pplacer                    1.1.alpha19      h9ee0642_2            bioconda
prodigal                   2.6.3            h577a1d6_11           bioconda
pydantic                   1.10.22          pyh3cfb1c2_0          conda-forge
python                     3.13.11          hc97d973_100_cp313    conda-forge
python_abi                 3.13             8_cp313               conda-forge
readline                   8.3              h853b02a_0            conda-forge
skani                      0.3.1            ha6fb395_0            bioconda
tk                         8.6.13           noxft_ha0e22de_103    conda-forge
tqdm                       4.67.1           pyhd8ed1ab_1          conda-forge
typing_extensions          4.15.0           pyhcf101f3_0          conda-forge
tzdata                     2025c            hc9c84f9_1            conda-forge
zstd                       1.5.7            hb78ec9c_6            conda-forge
2026-01-21 19:22:33  (rev 0)
    +_libgcc_mutex-0.1 (conda-forge)
    +_openmp_mutex-4.5 (conda-forge)
    +bzip2-1.0.8 (conda-forge)
    +ca-certificates-2026.1.4 (conda-forge)
    +colorama-0.4.6 (conda-forge)
    +dendropy-5.0.8 (bioconda)
    +fastani-1.34 (bioconda)
    +fasttree-2.2.0 (bioconda)
    +gsl-2.8 (conda-forge)
    +gtdbtk-2.6.1 (bioconda)
    +hmmer-3.4 (bioconda)
    +icu-78.2 (conda-forge)
    +ld_impl_linux-64-2.45 (conda-forge)
    +libblas-3.11.0 (conda-forge)
    +libcblas-3.11.0 (conda-forge)
    +libexpat-2.7.3 (conda-forge)
    +libffi-3.5.2 (conda-forge)
    +libgcc-15.2.0 (conda-forge)
    +libgfortran-15.2.0 (conda-forge)
    +libgfortran5-15.2.0 (conda-forge)
    +libgomp-15.2.0 (conda-forge)
    +liblapack-3.11.0 (conda-forge)
    +liblzma-5.8.2 (conda-forge)
    +libmpdec-4.0.0 (conda-forge)
    +libopenblas-0.3.30 (conda-forge)
    +libsqlite-3.51.2 (conda-forge)
    +libstdcxx-15.2.0 (conda-forge)
    +libuuid-2.41.3 (conda-forge)
    +libzlib-1.3.1 (conda-forge)
    +ncurses-6.5 (conda-forge)
    +numpy-2.4.1 (conda-forge)
    +openssl-3.6.0 (conda-forge)
    +pip-25.3 (conda-forge)
    +pplacer-1.1.alpha19 (bioconda)
    +prodigal-2.6.3 (bioconda)
    +pydantic-1.10.22 (conda-forge)
    +python-3.13.11 (conda-forge)
    +python_abi-3.13 (conda-forge)
    +readline-8.3 (conda-forge)
    +skani-0.3.1 (bioconda)
    +tk-8.6.13 (conda-forge)
    +tqdm-4.67.1 (conda-forge)
    +typing_extensions-4.15.0 (conda-forge)
    +tzdata-2025c (conda-forge)
    +zstd-1.5.7 (conda-forge)

Server information

  • CPU: grep -m 1 "^model name" /proc/cpuinfo && grep -c "^processor" /proc/cpuinfo
  • RAM: grep "^MemTotal" /proc/meminfo
  • OS: cat /etc/os-release
$ grep -m 1 "^model name" /proc/cpuinfo && grep -c "^processor" /proc/cpuinfo
model name	: Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz
16

$ grep "^MemTotal" /proc/meminfo
MemTotal:       129804256 kB

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

Debugging information

  • [ X ] gtdbtk.log has been included (drag and drop the file to upload).
  • [ X ] Genomes have been included (if possible, and there are few).
    bins.zip

The 2 bins are model organisms (ecoli and hvolcanii) just for testing:

$ cat all_genomes/gtdbtk.log
[2026-01-21 22:20:07] INFO: GTDB-Tk v2.6.1
[2026-01-21 22:20:07] INFO: gtdbtk classify_wf --genome_dir bins --prefix all_genomes --out_dir all_genomes --cpus 8 --extension fa.gz --skani_sketch_dir sketches
[2026-01-21 22:20:07] INFO: Using GTDB-Tk reference data version r226: r226
[2026-01-21 22:20:08] INFO: Loading reference genomes.
[2026-01-21 22:20:09] INFO: Calculating all vs all ANI with skani v0.3.1.
[2026-01-21 22:20:09] INFO: Sketching refence genomes
[2026-01-21 22:20:09] INFO: Sketches already exist at sketches, skipping sketching step.
[2026-01-21 22:20:09] INFO: Done
[2026-01-21 22:22:25] INFO: Capturing skani results.
[2026-01-21 22:22:26] ERROR: Uncontrolled exit resulting from an unexpected error.

================================================================================
EXCEPTION: AttributeError
  MESSAGE: 'NoneType' object has no attribute 'startswith'
________________________________________________________________________________

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/gtdbtk/__main__.py", line 100, in main
    gt_parser.parse_options(args)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/local/lib/python3.13/site-packages/gtdbtk/main.py", line 1132, in parse_options
    all_classified_ani,classified_genomes = self.ani_screen(options)
                                            ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/gtdbtk/main.py", line 653, in ani_screen
    classified_genomes,reports = aniscreener.run_aniscreen(
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^
        genomes=genomes,
        ^^^^^^^^^^^^^^^^
        out_dir=options.out_dir,
        ^^^^^^^^^^^^^^^^^^^^^^^^
        prefix=options.prefix,
        ^^^^^^^^^^^^^^^^^^^^^^
        skani_sketch_dir=options.skani_sketch_dir)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/gtdbtk/ani_screen.py", line 54, in run_aniscreen
    skani_classified_user_genomes = self.sort_skani_ani_screen(
         skani_results,taxonomy)
  File "/usr/local/lib/python3.13/site-packages/gtdbtk/ani_screen.py", line 96, in sort_skani_ani_screen
    canonical_gid(ref_gid))]
    ~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/gtdbtk/biolib_lite/common.py", line 43, in canonical_gid
    if gid.startswith('U'):
       ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
================================================================================
[2026-01-21 22:34:36] INFO: GTDB-Tk v2.6.1
[2026-01-21 22:34:36] INFO: gtdbtk classify_wf --genome_dir bins --prefix all_genomes --out_dir all_genomes --cpus 8 --extension fa.gz --skani_sketch_dir sketches
[2026-01-21 22:34:36] ERROR: Controlled exit resulting from early termination.
[2026-01-21 22:34:59] INFO: GTDB-Tk v2.6.1
[2026-01-21 22:34:59] INFO: gtdbtk classify_wf --genome_dir bins --prefix all_genomes --out_dir all_genomes --cpus 8 --extension fa.gz --skani_sketch_dir sketches
[2026-01-21 22:34:59] INFO: Using GTDB-Tk reference data version r226: r226
[2026-01-21 22:34:59] INFO: Loading reference genomes.
[2026-01-21 22:35:00] INFO: Calculating all vs all ANI with skani v0.3.1.
[2026-01-21 22:35:00] INFO: Sketching refence genomes
[2026-01-21 22:35:00] INFO: Sketches already exist at sketches, skipping sketching step.
[2026-01-21 22:35:00] INFO: Done
[2026-01-21 22:35:27] INFO: Capturing skani results.
[2026-01-21 22:35:27] ERROR: Uncontrolled exit resulting from an unexpected error.

================================================================================
EXCEPTION: AttributeError
  MESSAGE: 'NoneType' object has no attribute 'startswith'
________________________________________________________________________________

Traceback (most recent call last):
  File "/mnt/efs/miniforge3/envs/gtdbtk-2.6.1/lib/python3.13/site-packages/gtdbtk/__main__.py", line 100, in main
    gt_parser.parse_options(args)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/mnt/efs/miniforge3/envs/gtdbtk-2.6.1/lib/python3.13/site-packages/gtdbtk/main.py", line 1132, in parse_options
    all_classified_ani,classified_genomes = self.ani_screen(options)
                                            ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/mnt/efs/miniforge3/envs/gtdbtk-2.6.1/lib/python3.13/site-packages/gtdbtk/main.py", line 653, in ani_screen
    classified_genomes,reports = aniscreener.run_aniscreen(
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^
        genomes=genomes,
        ^^^^^^^^^^^^^^^^
        out_dir=options.out_dir,
        ^^^^^^^^^^^^^^^^^^^^^^^^
        prefix=options.prefix,
        ^^^^^^^^^^^^^^^^^^^^^^
        skani_sketch_dir=options.skani_sketch_dir)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/efs/miniforge3/envs/gtdbtk-2.6.1/lib/python3.13/site-packages/gtdbtk/ani_screen.py", line 54, in run_aniscreen
    skani_classified_user_genomes = self.sort_skani_ani_screen(
         skani_results,taxonomy)
  File "/mnt/efs/miniforge3/envs/gtdbtk-2.6.1/lib/python3.13/site-packages/gtdbtk/ani_screen.py", line 96, in sort_skani_ani_screen
    canonical_gid(ref_gid))]
    ~~~~~~~~~~~~~^^^^^^^^^
  File "/mnt/efs/miniforge3/envs/gtdbtk-2.6.1/lib/python3.13/site-packages/gtdbtk/biolib_lite/common.py", line 43, in canonical_gid
    if gid.startswith('U'):
       ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
================================================================================

Here's the md5 for the sketches:

$ md5sum sketches/*
51d02c8bc639d112bdccc5b8a5867f3b  sketches/index.db
ff39f41044e147b8933956ab2bc5ec56  sketches/markers.bin
512f74d1ef69a1487aeb8c30c4bd0bad  sketches/sketches.db

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorHelp required for a GTDB-Tk error.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions