stanfordnlp / stanza

Stanford NLP Python library for tokenization, sentence segmentation, NER, and parsing of many human languages
https://stanfordnlp.github.io/stanza/
Other
7.14k stars 880 forks source link

Has no attribute sys.stderr.isatty #1367

Closed AlekPet closed 2 months ago

AlekPet commented 3 months ago

Hello, add a check for the presence of the isatty attribute in the stanza/utils/get_tqdm.py module line 34.

Error: https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/issues/43

Thanks😊

AngledLuffa commented 3 months ago

I think it is expected that file objects have isatty()

https://docs.python.org/3/library/io.html#io.IOBase.isatty

Nevertheless, I can add a check for hasattr(sys.stderr, isatty)

AngledLuffa commented 2 months ago

This is now part of the 1.8.2 release