Iâm using simple script, which use transformer library. Like loading model definition and tokenizer from files, text-to-text generation task, and some UI, and itâs working while launched from python-file. But same script canât bee compiled in .exe, something always will went wrong. I tried to use different versions of packages, python, compilers (mostly PyInstaller), nothing seems to work.
Main issue is this exception:
"AttributeError: âNoneTypeâ object has no attribute âflushâ "
Which means some trouble in logger (full down below). Tried use this in script (not helped):
logger = logging.getLogger(âtransformersâ)
logger.disabled = False
logger.setLevel(logging.NOTSET)
Tried to use console only, and get this instead:
And no matter have I installed tqdm or not. Put simple progress bar in beginning from last version tqdm, same output.
I have no idea what else can I do in this situation. If You find a solution to this, please, describe each step in as much detail as possible.
Full output:
Traceback (most recent call last):
File âmain.pyâ, line 16, in
File ââ, line 1007, in _find_and_load
File ââ, line 986, in _find_and_load_unlocked
File ââ, line 680, in _load_unlocked
File âPyInstaller\loader\pyimod02_importers.pyâ, line 499, in exec_module
File âlang_model.pyâ, line 8, in
File ââ, line 1007, in _find_and_load
File ââ, line 986, in _find_and_load_unlocked
File ââ, line 680, in load_unlocked
File âPyInstaller\loader\pyimod02_importers.pyâ, line 499, in exec_module
File "transformers_init.py", line 30, in
File ââ, line 1007, in _find_and_load
File ââ, line 986, in _find_and_load_unlocked
File ââ, line 680, in _load_unlocked
File âPyInstaller\loader\pyimod02_importers.pyâ, line 499, in exec_module
File âtransformers\dependency_versions_check.pyâ, line 36, in
File ââ, line 1007, in _find_and_load
File ââ, line 986, in _find_and_load_unlocked
File ââ, line 680, in _load_unlocked
File âPyInstaller\loader\pyimod02_importers.pyâ, line 499, in exec_module
File âtransformers\file_utils.pyâ, line 60, in
File âtransformers\utils\logging.pyâ, line 123, in get_logger
File âtransformers\utils\logging.pyâ, line 86, in _configure_library_root_logger
AttributeError: âNoneTypeâ object has no attribute âflushâ