# HfApi uploading fail

**URL:** <https://discuss.huggingface.co/t/hfapi-uploading-fail/81620>\
**Category:** Beginners\
**Created:** [April 14, 2024, 12:49am UTC](https://discuss.huggingface.co/t/hfapi-uploading-fail/81620 "2024-04-14T00:49:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![t2chiang](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@t2chiang](https://discuss.huggingface.co/u/t2chiang)\
**Post date:** [April 14, 2024, 12:49am UTC](https://discuss.huggingface.co/t/hfapi-uploading-fail/81620/1 "2024-04-14T00:49:18Z")

</div>

Hello, I am a newcomer to hugging face API. I am now trying to upload a folder to my repo. Here are my code and error. Can somebody figure out where is the problem? I already login the huggingface in advance. Thank you guys.

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/1/5/1505fdf5c5c5528aca5493519475fe606a7401b8.png)

```auto
api = HfApi(token=token)

api.upload_folder(
    folder_path='Dataset/HOI4D_resample',
    repo_id='t2chiang/test',
    repo_type='dataset',
)

```
