KillianLucas / ooba

Run language models on consumer hardware.
GNU Affero General Public License v3.0
26 stars 6 forks source link

If github check fails, can't 'import ooba' - Exception: Failed to fetch latest release from GitHub API. #9

Open MarkEdmondson1234 opened 1 year ago

MarkEdmondson1234 commented 1 year ago

Looks like this issue is better here, as its the ooba check that is failing:

https://github.com/KillianLucas/open-interpreter/issues/713

MarkEdmondson1234 commented 1 year ago

I don't get why its still failing when I try locally, as I can reach it from terminal:

https://github.com/KillianLucas/ooba/blob/main/ooba/utils/get_latest_release.py

>>> import requests
>>> response = requests.get("https://api.github.com/repos/oobabooga/text-generation-webui/releases/latest")
>>> response.status_code == 200
True

but running on server its:

import ooba
  File "/usr/local/lib/python3.10/site-packages/ooba/__init__.py", line 1, in <module>
    from .download import download
  File "/usr/local/lib/python3.10/site-packages/ooba/download.py", line 2, in <module>
    from .utils.ensure_repo_exists import ensure_repo_exists
  File "/usr/local/lib/python3.10/site-packages/ooba/utils/ensure_repo_exists.py", line 8, in <module>
    TAG = get_latest_release()
  File "/usr/local/lib/python3.10/site-packages/ooba/utils/get_latest_release.py", line 8, in get_latest_release
    raise Exception("Failed to fetch latest release from GitHub API.")
Exception: Failed to fetch latest release from GitHub API."

and the server is downloading other stuff from the web fine.

Notnaton commented 1 year ago

Can you run python --version @MarkEdmondson1234

MarkEdmondson1234 commented 1 year ago

Python version: 3.10

IT came from docker image python:3.10-slim

Its back online now so I can't reproduce, but for next time would be nice to fix it

Notnaton commented 1 year ago

I think it is caused by the host and virtual environment having different python versions...