albertyw / itolapi

Python API for the Interactive Tree of Life (iTOL)
MIT License
33 stars 11 forks source link

itol_uploader.add_file() errors #38

Closed LiZhihua1982 closed 8 months ago

LiZhihua1982 commented 10 months ago

image

albertyw commented 8 months ago

file_path should be a python path type instead of a string: https://docs.python.org/3/library/pathlib.html#concrete-paths

an easy way of creating path types for add_file is:

from pathlib import Path

itol_uploader.add_file(Path('tree_of_life.tree.txt'))

This is clarified in edde2d6