chriskiehl / Gooey

Turn (almost) any Python command line program into a full GUI application with one line
MIT License
20.68k stars 1.02k forks source link

Problem with "colored" library for richtext-control #887

Open jp000 opened 1 year ago

jp000 commented 1 year ago

When setting richtext_controls=True in Gooey's decorator, the library "colored" version 2.2.2 makes exceptions due to an api change from version 1.4.4 colored was updated in june 2023

Detected on windows 10 Python 3.9

dalonsoa commented 1 year ago

I can confirm this

Lauszus commented 1 year ago

Just to add on this. This is the exception:

  File "gooey/python_bindings/gooey_decorator.py", line 123, in run_gooey
  File "gooey/gui/application.py", line 21, in run
  File "gooey/gui/application.py", line 27, in build_app
  File "gooey/gui/application.py", line 40, in _build_app
  File "gooey/gui/containers/application.py", line 47, in __init__
  File "gooey/gui/components/console.py", line 21, in __init__
  File "gooey/gui/components/widgets/richtextconsole.py", line 45, in __init__
AttributeError: 'function' object has no attribute 'ESC'

I solved this for now by specifying the colored version when installing:

pip install gooey==1.0.8.1 colored==1.4.4
jcfuentes commented 12 months ago

any plans on updating this to colored 2.2.3?

Entropy0 commented 8 months ago

colored==1.4.4

This makes the exception go away but at least for me (python 3.11 on windows) the output is not being formatted.