openai / openai-python

The official Python library for the OpenAI API
https://pypi.org/project/openai/
Apache License 2.0
22.95k stars 3.22k forks source link

"openai migrate" Error: Failed to download Grit CLI #1838

Open atthasaeth opened 1 week ago

atthasaeth commented 1 week ago

Confirm this is an issue with the Python library and not an underlying OpenAI API

Describe the bug

When running the openai migrate command, it attempts to download the Grit CLI from https://github.com/getgrit/gritql/releases/latest/download/marzano-x86_64-unknown-linux-gnu.tar.gz, but the link appears to be broken or outdated and it response Error: Failed to download Grit CLI from https://github.com/getgrit/gritql/releases/latest/download/marzano-x86_64-unknown-linux-gnu.tar.gz

To Reproduce

  1. Install the latest version of openai via pip: pip install openai --upgrade
  2. Observe the command attempting to download the file marzano-x86_64-unknown-linux-gnu.tar.gz.

I think that the current Grit releases on GitHub seem to have changed the prefix from marzano- to grit- in the file names, which is likely causing the download to fail.

Code snippets

No response

OS

Ubuntu 20.04 LTS

Python version

Python v3.11.4

Library version

openai 1.53.0

mvmendes commented 1 week ago

I could bypass this bug is downloading grit and executing grit CLI , with "apply openai" parameters:

$ openai migrate
Downloading Grit CLI from https://github.com/getgrit/gritql/releases/latest/download/marzano-x86_64-unknown-linux-gnu.tar.gz
Error: Failed to download Grit CLI from https://github.com/getgrit/gritql/releases/latest/download/marzano-x86_64-unknown-linux-gnu.tar.gz

$ curl -fsSL https://docs.grit.io/install | bash
downloading grit 0.1.0-alpha.1730315451 x86_64-unknown-linux-gnu
installing to /home/marcus/.grit/bin
  grit
everything's installed!

To add $HOME/.grit/bin to your PATH, either restart your shell or run:

    source $HOME/.grit/bin/env (sh, bash, zsh)
    source $HOME/.grit/bin/env.fish (fish)

$  source $HOME/.grit/bin/env 

$ grit apply openai
adenisdeveloper commented 1 week ago

grit apply openai

Thanks for the tip, it worked! I was having the same problem!