{"id":8447,"library":"progressbar33","title":"progressbar33 - Text Progress Bar","description":"progressbar33 is a Python library for creating customizable text-based progress bars in terminal applications. It provides a simple API to display progress for long-running operations. The current version is 2.4, and its development appears to be in maintenance mode with infrequent updates.","status":"maintenance","version":"2.4","language":"en","source_language":"en","source_url":"http://github.com/germangh/python-progressbar","tags":["progressbar","cli","terminal","ui","progress"],"install":[{"cmd":"pip install progressbar33","lang":"bash","label":"Install progressbar33"}],"dependencies":[],"imports":[{"note":"Despite the package name `progressbar33`, the module itself is named `progressbar`. Importing `from progressbar33` will result in a `ModuleNotFoundError`.","wrong":"from progressbar33 import ProgressBar","symbol":"ProgressBar","correct":"from progressbar import ProgressBar"},{"note":"Common widget classes like `Percentage`, `Bar`, `ETA`, etc., are also imported from the `progressbar` module.","symbol":"widgets","correct":"from progressbar import Percentage, Bar, ETA"}],"quickstart":{"code":"import time\nfrom progressbar import ProgressBar, Percentage, Bar, RotatingMarker, ETA\n\n# Define widgets for the progress bar\nwidgets = [\n    'Processing: ', Percentage(),\n    ' ', Bar(marker=RotatingMarker()),\n    ' ', ETA(),\n]\n\n# Initialize the progress bar with a maximum value\nmax_items = 50\nwith ProgressBar(widgets=widgets, max_value=max_items) as bar:\n    for i in range(max_items):\n        # Simulate some work\n        time.sleep(0.1)\n        # Update the progress bar\n        bar.update(i + 1)\nprint('\\nTask Completed!')","lang":"python","description":"This quickstart demonstrates how to create a basic progress bar using `progressbar33` (which imports as `progressbar`). It initializes a `ProgressBar` with a list of widgets and updates it within a loop. The `with` statement ensures the progress bar is properly finished and cleaned up."},"warnings":[{"fix":"Always use a dedicated virtual environment for your project. If you intend to use `progressbar33`, ensure the other `progressbar` library is not installed in the same environment. Consider migrating to the more active `progressbar` library if its features meet your needs.","message":"Namespace Collision: Installing `progressbar33` will install a module named `progressbar`. If the more actively maintained `progressbar` library (PyPI: `progressbar`, often used with `import progressbar`) is also installed or intended to be used, this will lead to conflicts and unpredictable behavior, as both attempt to provide `import progressbar`. It is strongly recommended to use separate virtual environments or choose only one library.","severity":"breaking","affected_versions":"All versions of progressbar33"},{"fix":"Ensure your project's Python interpreter is version 3.4 or newer.","message":"Python 3 Only: Despite `requires_python: None` being listed on PyPI, the library explicitly requires Python 3.4 or higher as per its `setup.py` (`python_requires='>=3.4'`). Attempting to use it with Python 2.x will result in compatibility errors.","severity":"gotcha","affected_versions":"All versions of progressbar33"},{"fix":"Wrap your progress bar usage in a `with` statement (e.g., `with ProgressBar(...) as bar:`), or explicitly call `bar.finish()` after your loop: `bar = ProgressBar(...).start(); for ...: bar.update(...); bar.finish()`.","message":"Forgetting `bar.finish()`: If you do not use the `with` statement context manager when creating your `ProgressBar` instance, you must explicitly call `bar.finish()` after the loop or process completes. Failing to do so will leave the progress bar display incomplete or improperly terminated.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Initialize `ProgressBar` with `max_value` set to the total count, e.g., `ProgressBar(max_value=len(my_list))` or `ProgressBar(max_value=100)`.","message":"`max_value` for finite iterables: For processes where the total number of iterations is known (e.g., iterating over a list or range), `max_value` must be explicitly set when initializing `ProgressBar`. If `max_value` is not set for a finite process, the progress bar may not display percentage or ETA correctly.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Change your import statement from `from progressbar33 import ...` to `from progressbar import ...`.","cause":"The Python package `progressbar33` installs an internal module named `progressbar`, not `progressbar33`.","error":"ModuleNotFoundError: No module named 'progressbar33'"},{"fix":"Ensure you either use a `with` statement: `with ProgressBar(...) as bar:` or manually call `bar.finish()` after your loop: `bar = ProgressBar(...).start(); ...; bar.finish()`.","cause":"This error typically occurs if the `finish()` method was not explicitly called after the progress bar completed, and the `with` statement context manager was not used.","error":"AttributeError: 'ProgressBar' object has no attribute 'finish'"},{"fix":"Initialize `ProgressBar` with `max_value` set to the total count: `bar = ProgressBar(max_value=total_iterations)`.","cause":"The `ProgressBar` instance needs to know the total number of iterations to correctly display percentage and ETA, especially when iterating over a finite sequence. This error indicates `max_value` was not set.","error":"TypeError: object of type 'ProgressBar' has no len()"},{"fix":"Run your application with a Python 3.x interpreter (specifically 3.4 or newer).","cause":"progressbar33 is a Python 3.4+ library and contains syntax incompatible with Python 2.x.","error":"SyntaxError: invalid syntax (on Python 2.x)"}]}