Find answers from the community

Updated 2 years ago

Heya when trying to import

Heya, when trying to import SQLContextBuilder, I'm getting an ImportError.

I've tried importing SQLContextBuilder directly from the file where it's defined, but then I get an ImportError on DEFAULT_REFINE_TABLE_CONTEXT_PROMPT in default_prompts.

Is anyone else getting this error? Have upgraded to the latest package version, any other ideas for what I could try?
Attachment
image.png
j
C
20 comments
hey, oh weird. let me test this on a fresh install
Thanks @jerryjliu0 !
does everything else work?
Have tried running the individual files and they all seem to run fine 🧐
Yea seems to
is it just the SQLContextBuilder
Yea, everything else imports fine
Attachment
image.png
hm i just tested on a fresh install of gpt index, it seems fine. what version are you on?
And python 3.9?
what's the error if you import SQLContextBuilder from the source file?
This
Attachment
image.png
weird, and if you go into that file (in default_prompts.py), that variable doesn't exist?
It does exist πŸ€·β€β™‚οΈ

Was trying to find some sort of circular reference, but the imports below this file all seem fairly 1 directional
Attachment
image.png
you're running this in a jupyter notebook right
could you try an interpreter? as a sanity check
Ahhh yea, seems to run fine with the interpreter directly, so must be something weird with the notebook/vscode set up. Will figure something out on my side
Add a reply
Sign up and join the conversation on Discord