Why am i getting KeyError 'email'?
Screenshot 2024-05-29 191223.21920×1020 88.9 KBI tried to clone the repository and it was successful but after the clone was successful a KeyError email occurredwhat do I have to do ?
2024-06-08T15:09:26Z
I am getting same error.from transformers.keras_callbacks import PushToHubCallback
from tensorflow.keras.callbacks import TensorBoard

tensorboard_callback = TensorBoard(log_dir="./ic_from_scratch_model_save/logs")

push_to_hub_model_id = "{}/convnext-tiny-224-finetuned-class-example".format(user)

push_to_hub_callback = PushToHubCallback(
    output_dir="./ic_from_scratch_model_save",
    hub_model_id=push_to_hub_model_id,
    tokenizer=feature_extractor
)I logged using notebook loginfrom huggingface_hub import notebook_login

notebook_login()and git lfs. I am working on Colab.%%capture
!git lfs install
!git config --global credential.helper storeMy version of transformers is4.41.2.
2024-06-09T20:21:41Z
Pinging@Wauplinhere
2024-06-10T06:40:58Z
For context,Repositoryis a legacy class to handle repositories on the Hub. Here isa small guideexplaining why you should avoid using it. Regarding why you have a KeyError onwhoami()["email"], it might be due to the fact the token you are using don’t have the permission to access the user’s email. That can be the case if using an OAuth token in a Space for instance and that the permission is not granted (or that you are using a finegrained token).I opened a PR to fix this in the future:Fix Repository if whoami call doesn't return an email by Wauplin · Pull Request #2320 · huggingface/huggingface_hub · GitHub. In the meantime, try to avoid usingRepositoryor if you have to, pass agit_user/git_emailas argument when instantiating the Repository object.