Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook_login() fails for jupyter notebook #2417

Open
HarryLyness opened this issue Jul 24, 2024 · 1 comment
Open

notebook_login() fails for jupyter notebook #2417

HarryLyness opened this issue Jul 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@HarryLyness
Copy link

Describe the bug

Logging on with google colabs works fine. When attempting to log in to huggingface on jupyter notebook

image

I get the following error.

[Errno 13] Permission denied:

I have also tried alternative methods, e.g.

from huggingface_hub import login

login(token=os.environ.get("HF_TOKEN"))
[Errno 13] Permission denied: 'C:\\Users\\harry\\.cache\\huggingface\\token'

Reproduction

from huggingface_hub import login

login(token=os.environ.get("HF_TOKEN"))

Logs

[Errno 13] Permission denied: 'C:\\Users\\harry\\.cache\\huggingface\\token'

System info

{'huggingface_hub version': '0.24.1',
 'Platform': 'Windows-10-10.0.22621-SP0',
 'Python version': '3.11.5',
 'Running in iPython ?': 'Yes',
 'iPython shell': 'ZMQInteractiveShell',
 'Running in notebook ?': 'Yes',
 'Running in Google Colab ?': 'No',
 'Token path ?': 'C:\\Users\\harry\\.cache\\huggingface\\token',
 'Has saved token ?': True,
 'Who am I ?': 'diffusepanda4',
 'FastAI': 'N/A',
 'Tensorflow': 'N/A',
 'Torch': '2.1.0',
 'Jinja2': '3.1.2',
 'Graphviz': 'N/A',
 'keras': 'N/A',
 'Pydot': 'N/A',
 'Pillow': '9.4.0',
 'hf_transfer': 'N/A',
 'gradio': 'N/A',
 'tensorboard': 'N/A',
 'numpy': '1.24.3',
 'pydantic': '1.10.8',
 'aiohttp': '3.8.5',
 'ENDPOINT': 'https://huggingface.co',
 'HF_HUB_CACHE': 'C:\\Users\\harry\\.cache\\huggingface\\hub',
 'HF_ASSETS_CACHE': 'C:\\Users\\harry\\.cache\\huggingface\\assets',
 'HF_TOKEN_PATH': 'C:\\Users\\harry\\.cache\\huggingface\\token',
 'HF_HUB_OFFLINE': False,
 'HF_HUB_DISABLE_TELEMETRY': False,
 'HF_HUB_DISABLE_PROGRESS_BARS': None,
 'HF_HUB_DISABLE_SYMLINKS_WARNING': False,
 'HF_HUB_DISABLE_EXPERIMENTAL_WARNING': False,
 'HF_HUB_DISABLE_IMPLICIT_TOKEN': False,
 'HF_HUB_ENABLE_HF_TRANSFER': False,
 'HF_HUB_ETAG_TIMEOUT': 10,
 'HF_HUB_DOWNLOAD_TIMEOUT': 10}
@HarryLyness HarryLyness added the bug Something isn't working label Jul 24, 2024
@Wauplin
Copy link
Contributor

Wauplin commented Jul 24, 2024

Hi @HarryLyness, I'm sorry for the inconvenience. It looks like the Python interpreter running the Jupyter notebook don't have permission to write into 'C:\\Users\\harry\\.cache\\huggingface\\token' file - which is not really a problem with huggingface_hub itself. This should not be the case if you run it from harry user. Could you check manually that you have the permission to do it? (for example with touch C:\\Users\\harry\\.cache\\huggingface\\token' on WSL).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants