# Autotrain 401 permission error

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fautotrain-401-permission-error%2F151736%3E%5C
**Category:** Beginners\
**Created:** [April 22, 2025, 2:49am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fautotrain-401-permission-error%2F151736 "2025-04-22T02:49:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [April 22, 2025, 5:05am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fautotrain-401-permission-error%2F151736%2F2 "2025-04-22T05:05:45Z")

</div>

There are various causes for 401 errors, but the simplest case is a token error.  
Setting the Read token to the **HF\_TOKEN** environment variable **in conda container** may resolve the issue.

> **[Managing environments — conda 25.3.2.dev18 documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)**

> <https://github.com/huggingface/autotrain-advanced/issues/763>
>
> \### Prerequisites
> 
> \- \[X\] I have read the \[documentation\](https://hf.co/docs/auto…train).
> \- \[X\] I have checked other issues for similar problems.
> 
> \### Backend
> 
> Local
> 
> \### Interface Used
> 
> UI
> 
> \### CLI Command
> 
> app --port 8081 --host 0.0.0.0
> 
> \### UI Screenshots & Parameters
> 
> warnings.warn(msg, RuntimeWarning)
> INFO | 2024-09-14 09:36:40 | autotrain.app.ui\_routes:\<module\>:32 - Starting AutoTrain...
> INFO | 2024-09-14 09:36:53 | autotrain.app.ui\_routes:\<module\>:294 - AutoTrain started successfully
> INFO | 2024-09-14 09:36:53 | autotrain.app.app:\<module\>:13 - Starting AutoTrain...
> INFO | 2024-09-14 09:36:53 | autotrain.app.app:\<module\>:23 - AutoTrain version: 0.8.9
> INFO | 2024-09-14 09:36:53 | autotrain.app.app:\<module\>:24 - AutoTrain started successfully
> INFO: Started server process \[36640\]
> INFO: Waiting for application startup.
> INFO: Application startup complete.
> INFO: Uvicorn running on http://192.168.20.172:8081 (Press CTRL+C to quit)
> INFO: 192.168.20.172:65436 - "GET / HTTP/1.1" 307 Temporary Redirect
> INFO: 192.168.20.172:65436 - "GET /ui/ HTTP/1.1" 401 Unauthorized
> 
> \### Error Logs
> 
> warnings.warn(msg, RuntimeWarning)
> INFO | 2024-09-14 09:36:40 | autotrain.app.ui\_routes:\<module\>:32 - Starting AutoTrain...
> INFO | 2024-09-14 09:36:53 | autotrain.app.ui\_routes:\<module\>:294 - AutoTrain started successfully
> INFO | 2024-09-14 09:36:53 | autotrain.app.app:\<module\>:13 - Starting AutoTrain...
> INFO | 2024-09-14 09:36:53 | autotrain.app.app:\<module\>:23 - AutoTrain version: 0.8.9
> INFO | 2024-09-14 09:36:53 | autotrain.app.app:\<module\>:24 - AutoTrain started successfully
> INFO: Started server process \[36640\]
> INFO: Waiting for application startup.
> INFO: Application startup complete.
> INFO: Uvicorn running on http://192.168.20.172:8081 (Press CTRL+C to quit)
> INFO: 192.168.20.172:65436 - "GET / HTTP/1.1" 307 Temporary Redirect
> INFO: 192.168.20.172:65436 - "GET /ui/ HTTP/1.1" 401 Unauthorized
> 
> \### Additional Information
> 
> \_No response\_

> [@Error 401 Client Error: Unauthorized for url](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-401-client-error-unauthorized-for-url%2F19714)%3A
>
> When using model card of my private speech recognition model with LM, I got this error: 401 Client Error: Unauthorized for url: [https://huggingface.co/api/models/taliai/tali-asr-with-lm/revision/main](https://huggingface.co/api/models/taliai/tali-asr-with-lm/revision/main) while the same model without lm works fine. Is there anything wrong on my model or model card or … Any help is appreciated.

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fautotrain-401-permission-error%2F151736)._
