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

[FIX] #708

Closed
2 of 9 tasks
alifemove opened this issue Apr 16, 2024 · 10 comments
Closed
2 of 9 tasks

[FIX] #708

alifemove opened this issue Apr 16, 2024 · 10 comments
Labels
fix Fix something that isn't working as expected

Comments

@alifemove
Copy link

alifemove commented Apr 16, 2024

Describe the bug

A clear and concise description of what the bug is. Please include what you were expecting to happen vs. what actually happened.

Platform

  • Server:
    • Cloud-Hosted (https://app.khoj.dev)
    • Self-Hosted Docker
    • Self-Hosted Python package
    • Self-Hosted source code
  • OS:
    • Windows
    • macOS silicon
    • Linux
    • Android
    • iOS

If self-hosted

  • Server Version [e.g. 1.0.1]: Whatever latest is as of today, can't run khoj --version or any other command.
khoj --anonymous-mode
Traceback (most recent call last):
  File "/Users/local/.pyenv/versions/3.11.1/bin/khoj", line 5, in <module>
    from khoj.main import run
  File "/Users/local/.pyenv/versions/3.11.1/lib/python3.11/site-packages/khoj/main.py", line 80, in <module>
    from khoj.configure import configure_routes, initialize_server, configure_middleware
  File "/Users/local/.pyenv/versions/3.11.1/lib/python3.11/site-packages/khoj/configure.py", line 23, in <module>
    from khoj.database.adapters import (
  File "/Users/-local/.pyenv/versions/3.11.1/lib/python3.11/site-packages/khoj/database/adapters/__init__.py", line 46, in <module>
    from khoj.utils import state
  File "/Users/local/.pyenv/versions/3.11.1/lib/python3.11/site-packages/khoj/utils/state.py", line 11, in <module>
    from khoj.utils import config as utils_config
  File "/Users/local/.pyenv/versions/3.11.1/lib/python3.11/site-packages/khoj/utils/config.py", line 11, in <module>
    from khoj.processor.conversation.offline.utils import download_model
  File "/Users/local/.pyenv/versions/3.11.1/lib/python3.11/site-packages/khoj/processor/conversation/offline/utils.py", line 5, in <module>
    from huggingface_hub.constants import HF_HUB_CACHE
ImportError: cannot import name 'HF_HUB_CACHE' from 'huggingface_hub.constants' (/Users/local/.pyenv/versions/3.11.1/lib/python3.11/site-packages/huggingface_hub/constants.py)
@alifemove alifemove added the fix Fix something that isn't working as expected label Apr 16, 2024
@sabaimran
Copy link
Member

Hey @alifemove , your issue description says you're using docker, but the stack trace implies you're using the python package. Can you confirm that this is just happening in the python package?

@alifemove
Copy link
Author

Oh sorry @sabaimran, I'm using the python package.

@sabaimran
Copy link
Member

Got it, let me investigate and see what's up. Is this a first-time install, or did you upgrade? (pip install --upgrade khoj-assistant)

@alifemove
Copy link
Author

Upgrade.

Looked at huggingface_hub, the constant being used is definitely there... /shrug

@sabaimran
Copy link
Member

Hmm, might be the hugging face hub package also needs an upgrade. I'm not able to repro your error on a clean install of khoj v1.10.2.

@alifemove
Copy link
Author

Yeah, I opened up the huggingface_hub local copy and it doesn't have that var.
Python not upgrading dependencies, yay...

@sabaimran
Copy link
Member

Can you run pip show huggingface-hub in your virtual environment where you're running Khoj and tell me the version of huggingface-hub? I'll upgrade our min version. Thanks for spotting & reporting this issue!

@alifemove
Copy link
Author

I was able to pip install --upgrade huggingface_hub and it works now.

Successfully uninstalled huggingface-hub-0.17.3

Successfully installed huggingface_hub-0.22.2

@alifemove
Copy link
Author

Thanks much.
🚀

@sabaimran
Copy link
Member

sabaimran commented Apr 16, 2024

Of course! Thanks for pointing it out. Always feel free to report bugs/issues/feature requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something that isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants