Find answers from the community

Updated 10 months ago

I was using mongoengine with the old

I was using mongoengine with the old llamaindex fine but running llamaindex-cli upgrade-file <file_path> gave this error, please help.
pydantic==1.10.8
llama-index==0.10.7
Attachment
image.png
L
T
9 comments
In your code, do you import/use pydantic anywhere?
Acutally, I think you just need to do as the error suggests
Plain Text
class Plug(Document):
  class Config:
        arbitrary_types_allowed = True
  ...
nope, I'm not importing pydantic anywhere, this is the part that's raising the error:
from mongoengine import Document, StringField class Plug(Document): plugName = StringField()
add the above, seems like StringField is not a recognized type to pydantic
Plain Text
class Plug(Document):
  plugName = StringField()  

  class Config:
        arbitrary_types_allowed = True
  ...
That fixed it, but I get this error when I run llamaindex-cli upgrade . now
Attachments
image.png
image.png
Yea thats a new one, figuring that out this morning :PSadge:
ok fixed it! new version coming shortly
Add a reply
Sign up and join the conversation on Discord