# Error: agent course

**URL:** <https://discuss.huggingface.co/t/error-agent-course/147345>\
**Category:** Beginners\
**Created:** [March 25, 2025, 1:16pm UTC](https://discuss.huggingface.co/t/error-agent-course/147345 "2025-03-25T13:16:31Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 25, 2025, 1:16pm UTC](https://discuss.huggingface.co/t/error-agent-course/147345/1 "2025-03-25T13:16:31Z")

</div>

I get an error then Duplicating space:  
To create a public link, set `share=True` in `launch()`.

1. choose: public  
 ![Screenshot_1](https://us1.discourse-cdn.com/hellohellohello/original/3X/4/3/4356ed81effe44df0872dc052f03485fb13abb65.png)

I need help, guys!!!

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 25, 2025, 1:57pm UTC](https://discuss.huggingface.co/t/error-agent-course/147345/2 "2025-03-25T13:57:46Z")

</div>

This is not an error in itself. A warning is like a notice, so you can ignore it unless you are doing maintenance.

If it doesn’t work, there is probably another cause.

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 26, 2025, 5:57am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/3 "2025-03-26T05:57:58Z")

</div>

![my_error](https://us1.discourse-cdn.com/hellohellohello/original/3X/0/2/026f1a8dedd8ee214f77c008d167a24c8c5d6e54.png)

the difference between us)))

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 26, 2025, 5:58am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/4 "2025-03-26T05:58:34Z")

</div>

![error_basic](https://us1.discourse-cdn.com/hellohellohello/original/3X/1/a/1af2000242efd23f0f0614cdf27935a1c0ecfec0.png)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 26, 2025, 6:23am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/5 "2025-03-26T06:23:53Z")

</div>

I think I’ve figured out the cause. (Even though it didn’t exist when the space was created, it still worked.) There was a change that made it so that it would no longer work unless the **HF\_TOKEN** secret was set, but the template didn’t support it.

If you set your valid READ token to the **HF\_TOKEN** secret, it should probably work.

> [@How to manage user secrets and API Keys?](https://discuss.huggingface.co/t/how-to-manage-user-secrets-and-api-keys/67948):
>
> As per the above page I didn’t see the Space repository to add a new variable or secret. new variable or secret are deprecated in settings page. How to handle the API Keys and user secrets like Secrets Manager?

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 26, 2025, 8:16am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/6 "2025-03-26T08:16:35Z")

</div>

same error:  
Logs

buildcontainer

View Dev ModeLock scrollClear

===== Application Startup at 2025-03-26 07:58:45 ===== tool.py: 0%| | 0.00/635 [00:00\<?, ?B/s] tool.py: 100%|██████████| 635/635 [00:00\<00:00, 4.50MB/s] \* Running on local URL: [http://0.0.0.0:7860](http://0.0.0.0:7860), with SSR ⚡ (experimental, to disable set `ssr=False` in `launch()`) /usr/local/lib/python3.10/site-packages/gradio/blocks.py:2680: UserWarning: Setting share=True is not supported on Hugging Face Spaces warnings.warn( To create a public link, set `share=True` in `launch()`.

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 26, 2025, 9:31am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/7 "2025-03-26T09:31:19Z")

</div>

token done, but error is staying

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 26, 2025, 10:54am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/8 "2025-03-26T10:54:15Z")

</div>

Hmm… It works for me…

 ![smolfirst](https://us1.discourse-cdn.com/hellohellohello/original/3X/e/3/e3d2cc387944d37717591fd23793cceb6c50655e.png)

### Log

```auto
===== Application Startup at 2025-03-26 10:52:49 =====

tool.py: 0%| | 0.00/635 [00:00<?, ?B/s]
tool.py: 100%|██████████| 635/635 [00:00<00:00, 3.29MB/s]
* Running on local URL: http://0.0.0.0:7860, with SSR ⚡ (experimental, to disable set `ssr=False` in `launch()`)
/usr/local/lib/python3.10/site-packages/gradio/blocks.py:2680: UserWarning: Setting share=True is not supported on Hugging Face Spaces
  warnings.warn(

To create a public link, set `share=True` in `launch()`.
╭────────────────────────────────── New run ───────────────────────────────────╮
│ │
│ test │
│ │
╰─ HfApiModel - Qwen/Qwen2.5-Coder-32B-Instruct ───────────────────────────────╯
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ─ Executing parsed code: ───────────────────────────────────────────────────── 
  import math                                                                   
  square_root = math.sqrt(144)                                                  
  final_answer(square_root)                                                     
 ────────────────────────────────────────────────────────────────────────────── 
Out - Final answer: 12.0
[Step 1: Duration 4.48 seconds| Input tokens: 2,010 | Output tokens: 85]

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 26, 2025, 10:57am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/9 "2025-03-26T10:57:25Z")

</div>

By the way, if you can use Discord, there is a dedicated Agents Course question corner on HF Discord.

> [@Join the Hugging Face Discord!](https://discuss.huggingface.co/t/join-the-hugging-face-discord/11263):
>
> We’re excited to announce our official community discord server! space_invader We will have community events, sprints, reading clubs and more! Here’s the link to join: [http://hf.co/join/discord](https://t.co/1n75wi976V?amp=1)Once you join, I highly encourage you to: Introduce yourself in the #introduce-yourself channel Verify your Hugging Face account at the #verification channel (cool stuff coming from this in the future!!) Share a picture of your pet to spread some joy in the #pets channel (this one is my personal fav…

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 26, 2025, 1:05pm UTC](https://discuss.huggingface.co/t/error-agent-course/147345/10 "2025-03-26T13:05:53Z")

</div>

Thanks for a help, bro 🤝

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 26, 2025, 1:38pm UTC](https://discuss.huggingface.co/t/error-agent-course/147345/11 "2025-03-26T13:38:54Z")

</div>

![Screenshot_1](https://us1.discourse-cdn.com/hellohellohello/original/3X/0/4/04e8c366b91d9a5ae34d0d3f1d72f83b794212f0.png)  
WTF?)))))

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 26, 2025, 2:30pm UTC](https://discuss.huggingface.co/t/error-agent-course/147345/12 "2025-03-26T14:30:05Z")

</div>

Python is one of the few programming languages that is broken by _just indentation_, even a whitespace. Use an editor like VSCode. It’s tough to use Notepad.

> <https://stackoverflow.com/questions/1016814/what-should-i-do-with-unexpected-indent-in-python>

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 27, 2025, 6:12am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/13 "2025-03-27T06:12:05Z")

</div>

i know what the python)))) And I fixed it.  
But the same problem remains.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 27, 2025, 7:07am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/14 "2025-03-27T07:07:06Z")

</div>

You need to set the HF\_TOKEN secret…

> **[Hugging Face – The AI community building the future.](https://huggingface.co/login?next=%2Fsettings%2Ftokens)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

1. ![hft1](https://us1.discourse-cdn.com/hellohellohello/original/3X/3/c/3c147e85e084b711de139336bcce98a317711c74.png)
2. ![sft2](https://us1.discourse-cdn.com/hellohellohello/original/3X/4/c/4cc97fcc6df5476149b4e0423196a7c0e67c61f8.png)
3. ![hft3](https://us1.discourse-cdn.com/hellohellohello/original/3X/6/9/69b7be48cc98d08bf8a8bee18aa092c3eb20ea8e.png)

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 27, 2025, 11:09am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/15 "2025-03-27T11:09:54Z")

</div>

i did it yet(((

---

<div class="post-metadata">

**Author:** ![Goldbit1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/goldbit1/32/44072_2.png) [@Goldbit1](https://discuss.huggingface.co/u/Goldbit1)\
**Post date:** [March 27, 2025, 11:10am UTC](https://discuss.huggingface.co/t/error-agent-course/147345/16 "2025-03-27T11:10:48Z")

</div>

i think that problem into the code
