pcroland / deew

Dolby Encoding Engine Wrapper
https://deew.dev
MIT License
195 stars 20 forks source link

Progress bar creates a crash on rich py lib #25

Closed PyragriC44 closed 1 year ago

PyragriC44 commented 1 year ago

Hello :)

I tried the 2.2.2 (or 2.2.3) on W10 and py 3.10.5 and seems like progress bar crashes after the ffmpeg command:

Running the following commands:
ffmpeg -y -drc_scale 0 -i [input] -c:a:0 pcm_s24le -rf64 always [output] && dee -x [input]

Traceback (most recent call last):
  File "G:\Mon Drive\Encoding\Tools\deew\deew.py", line 766, in <module>
    main()
  File "G:\Mon Drive\Encoding\Tools\deew\deew.py", line 710, in main
    with pb:
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 1079, in __exit__
    self.stop()
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 1065, in stop
    self.live.stop()
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\live.py", line 142, in stop
    self.refresh()
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\live.py", line 213, in refresh
    self._live_render.set_renderable(self.renderable)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\live.py", line 195, in renderable
    renderable = self.get_renderable()
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\live.py", line 98, in get_renderable
    self._get_renderable()
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 1437, in get_renderable
    renderable = Group(*self.get_renderables())
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 1442, in get_renderables
    table = self.make_tasks_table(self.tasks)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 1466, in make_tasks_table
    table.add_row(
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 1471, in <genexpr>
    else column(task)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 518, in __call__
    renderable = self.render(task)
  File "C:\Users\xxx\AppData\Local\Programs\Python\Python310\lib\site-packages\rich\progress.py", line 654, in render
    total=max(0, task.total),
TypeError: '>' not supported between instances of 'NoneType' and 'int'

When I comment pb code parts it works great, without progress bar then ;) I tried to fix with pip3 install rich[jupyter] but it doesn't do anything.

Regards.

pcroland commented 1 year ago

try pip install rich --upgrade

PyragriC44 commented 1 year ago

try pip install rich --upgrade

I had rich-12.1.0 version. Now on rich-12.5.1 it's working great. Thanks for the reactivity I upgraded everything except rich lib :( Thank you !