# Uploading a data set

**URL:** <https://discuss.huggingface.co/t/uploading-a-data-set/71815>\
**Category:** Beginners\
**Created:** [February 4, 2024, 4:03pm UTC](https://discuss.huggingface.co/t/uploading-a-data-set/71815 "2024-02-04T16:03:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoavkt](https://avatars.discourse-cdn.com/v4/letter/y/aeb1de/32.png) [@yoavkt](https://discuss.huggingface.co/u/yoavkt)\
**Post date:** [February 4, 2024, 4:03pm UTC](https://discuss.huggingface.co/t/uploading-a-data-set/71815/1 "2024-02-04T16:03:58Z")

</div>

I am trying to update a file in a dataset.  
When running my code locally, it works, but when I transfer it into the hugginface servers, I get an access error. The data set is private but I provide the token.  
I get the following error:

Repository Not Found for url: [https://huggingface.co/api/datasets/ImpMedLab/query\_log/preupload/main](https://huggingface.co/api/datasets/ImpMedLab/query_log/preupload/main).  
Please make sure you specified the correct `repo_id` and `repo_type`.  
If you are trying to access a private or gated repo, make sure you are authenticated.  
Invalid username or password.  
Note: Creating a commit assumes that the repo already exists on the Huggingface Hub. Please use `create_repo` if it’s not the case.

---

<div class="post-metadata">

**Author:** ![nilor](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@nilor](https://discuss.huggingface.co/u/nilor)\
**Post date:** [May 22, 2024, 10:56pm UTC](https://discuss.huggingface.co/t/uploading-a-data-set/71815/2 "2024-05-22T22:56:38Z")

</div>

Hello, did you ever figure this out? I am having the same issue

---

<div class="post-metadata">

**Author:** ![the-french-artist](https://avatars.discourse-cdn.com/v4/letter/t/6de8d8/32.png) [@the-french-artist](https://discuss.huggingface.co/u/the-french-artist)\
**Post date:** [June 13, 2024, 10:38pm UTC](https://discuss.huggingface.co/t/uploading-a-data-set/71815/4 "2024-06-13T22:38:23Z")

</div>

I found the issue!

I was using

```auto
HfFileSystem('my_token_here')

```

instead of

```auto
HfFileSystem(token='my_token_here')

```

The lack of argument `token` made me unauthorised to access my repo, which gave me this 401 and weird url ‘preupload/main’.

So: explicitely pass the token argument, or check that you are logged in.  
This url seems to be used in the background to pre-stage commits.
