Skip to content

Conversation

@danxuliu
Copy link

@danxuliu danxuliu commented Jan 5, 2026

Fixes #389

Starting with version 1.1.0, huggingface_hub passes a name argument to the custom progress bar. However, the base tqdm class rejects unknown arguments, so it needs to be removed before passsing it to its constructor (like done in the progress bar provided by huggingface_hub).

Besides that, since the same huggingface_hub change mentioned above 0 is initially passed as the total when creating the progress bar, so its use in the custom progress bar has been guarded to prevent a division by zero error.

Note, however, that I am not familiar at all with tqdm, huggingface_hub or nc_py_api, so there might be better fixes :-) (like showing an Initializing... message rather than just guarding the call to nc.set_init_status if total <= 0 or things like that).

Starting with version 1.1.0, huggingface_hub passes a "name" argument to
the custom progress bar. However, the base tqdm class rejects unknown
arguments, so it needs to be removed before passsing it to its
constructor.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Starting with version 1.1.0, huggingface_hub initially passes 0 as the
total when creating the progress bar and then updates it to the proper
value.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.65%. Comparing base (ef69321) to head (d07cf6c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
nc_py_api/ex_app/integration_fastapi.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
- Coverage   94.72%   94.65%   -0.08%     
==========================================
  Files          45       45              
  Lines        5385     5389       +4     
==========================================
  Hits         5101     5101              
- Misses        284      288       +4     
Files with missing lines Coverage Δ
nc_py_api/ex_app/integration_fastapi.py 23.07% <0.00%> (-0.56%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kyteinsky
Copy link
Contributor

thanks a lot! The last version I tested was 1.1.0 of hf_hub, looking up the changelog was smart :)
It should be fine like this without the initilising message, wdyt @oleksandr-nc ?

Copy link
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works like a charm!

@kyteinsky kyteinsky requested a review from oleksandr-nc January 5, 2026 06:51
kyteinsky added a commit to nextcloud/live_transcription that referenced this pull request Jan 5, 2026
@danxuliu
Copy link
Author

danxuliu commented Jan 5, 2026

looking up the changelog was smart :)

It would have been, but I did not until you mentioned it 🙈 I directly dived into the code when I got the error 😅 Beauty of FOSS ;-)

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

Successfully merging this pull request may close these issues.

Auto model download in the init phase is not working

2 participants