Skip to content

[Bug] Unable to downloads models #19

@sharatvisweswara

Description

@sharatvisweswara

Firstly, excellent work, I was looking to implement something like this and stumbled on to your project, unfortunately I could not get it to work with uv/uvx which is my preferred way to installing python tools.

What happened?
I installed and ran dictate using uvx --from dictate-mlx dictate and while the app ran in the background it was not able to download the models, I get (full stack trace in Logs section below):

AttributeError: type object 'ProgressTqdm' has no attribute 'get_lock'

Expected behavior
Should download models successfully.

Steps to reproduce

  1. run uvx --from dictate-mlx dictate

Environment

  • macOS version: Tahoe 26
  • Chip: M4 Pro
  • Python version: 3.12.0
  • Dictate version: 2.5.0
  • STT engine: N/A (unable to download)

Logs

❯ uvx --from dictate-mlx dictate

       ___      __        __
  ____/ (_)____/ /_____ _/ /____
 / __  / / ___/ __/ __ `/ __/ _ \
/ /_/ / / /__/ /_/ /_/ / /_/  __/
\__,_/_/\___/\__/\__,_/\__/\___/

  speak. it types.  v2.5.0 · 100% local · your words never leave your Mac
  M4 Pro · MacBook Pro Microphone

  First-time setup — downloading models (one-time only)

  [1/2] Speech recognition (~0.5 GB)
  Understands what you say — runs 100% on your Mac
  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0%Download failed for mlx-community/parakeet-tdt-0.6b-v3
Traceback (most recent call last):
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/dictate/model_download.py", line 206, in download_model
    snapshot_download(
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/huggingface_hub/_snapshot_download.py", line 450, in snapshot_download
    thread_map(
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 47, in _executor_map
    with ensure_lock(tqdm_class, lock_name=lock_name) as lk:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sharat/.local/share/uv/python/cpython-3.12.10-macos-aarch64-none/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 19, in ensure_lock
    lock = old_lock or tqdm_class.get_lock()  # maybe create a new lock
                       ^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'ProgressTqdm' has no attribute 'get_lock'

  Download failed: type object 'ProgressTqdm' has no attribute 'get_lock' — will retry on next launch.

  [2/2] Text cleanup (~0.9 GB)
  Fixes grammar and punctuation — no cloud, no API keys
  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0%Download failed for mlx-community/Qwen2.5-1.5B-Instruct-4bit
Traceback (most recent call last):
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/dictate/model_download.py", line 206, in download_model
    snapshot_download(
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py", line 89, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/huggingface_hub/_snapshot_download.py", line 450, in snapshot_download
    thread_map(
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 47, in _executor_map
    with ensure_lock(tqdm_class, lock_name=lock_name) as lk:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sharat/.local/share/uv/python/cpython-3.12.10-macos-aarch64-none/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/Users/sharat/.cache/uv/archive-v0/WaKNo8P5iZquypwWI3FJ3/lib/python3.12/site-packages/tqdm/contrib/concurrent.py", line 19, in ensure_lock
    lock = old_lock or tqdm_class.get_lock()  # maybe create a new lock
                       ^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'ProgressTqdm' has no attribute 'get_lock'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions