Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'<=' not supported between instances of 'FalseMeta' and 'int' when using progressbar #376

Open
Ashesh3 opened this issue Apr 16, 2024 · 0 comments

Comments

@Ashesh3
Copy link

Ashesh3 commented Apr 16, 2024

The below exception occurs on latest version of progressbar2 (4.4.2).

Solution: Install an older compatible version of the package: pip install progressbar2==4.1.0

'<=' not supported between instances of 'FalseMeta' and 'int'
Traceback (most recent call last):
  File "D:\Program Files\Python311\Lib\site-packages\youtube_upload\main.py", line 161, in upload_youtube_video
    video_id = upload_video.upload(youtube, video_path,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\youtube_upload\upload_video.py", line 44, in upload
    return lib.retriable_exceptions(upload_fun,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\youtube_upload\lib.py", line 72, in retriable_exceptions
    return fun()
           ^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\youtube_upload\upload_video.py", line 43, in <lambda>
    upload_fun = lambda: _upload_to_request(request, progress_callback)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\youtube_upload\upload_video.py", line 28, in _upload_to_request
    progress_callback(status.total_size, status.resumable_progress)
  File "D:\Program Files\Python311\Lib\site-packages\youtube_upload\main.py", line 96, in _callback
    bar.update(completed)
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 908, in update
    self.start()
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 1011, in start
    self.update(self.min_value, force=True)
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 939, in update
    self._update_parents(value)
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 958, in _update_parents
    StdRedirectMixin.update(self, value=value)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 462, in update
    DefaultFdMixin.update(self, value=value)
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 305, in update
    line: str = converters.to_unicode(self._format_line())
                                      ^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 336, in _format_line
    widgets = ''.join(self._to_unicode(self._format_widgets()))
                                       ^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\bar.py", line 362, in _format_widgets
    widget_output = converters.to_unicode(widget(self, data))
                                          ^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\progressbar\widgets.py", line 715, in __call__
    scaled, power = utils.scale_1024(value, len(self.prefixes))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Program Files\Python311\Lib\site-packages\python_utils\converters.py", line 255, in scale_1024
    if x <= 0:
       ^^^^^^
TypeError: '<=' not supported between instances of 'FalseMeta' and 'int'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant