AttributeError: 'super' object has no attribute 'parse_obj'

Hi all,

I got the above error in lesson 5 when trying to run this line:

spec = OpenAPISpec.from_text(text)

Just wondering if there is a way to solve?


Hi Martin, yes I solved this error by installing one more package and fixing the versions to the same as run on the hosted Cloudera notebook.

First check that the same pydantic and langchain versions are installed locally as when running the notebook on the Coursera hosted notebook-platform.

The requirements are,


I found that other had solved the above error by also installing the openapi-schema-pydantic package. The version I’ve used for running the notebook locally is,

1 Like

I have installed the specific version of pydantic, langchain and openai-schema-pydantic. But the error still persists.

Thanks, installing openapi-schema-pydantic==1.2.4 works for me!

Is it you running the code through a local notebook?

Could you check that you are running your correct kernel in your notebook, and check that the versions that are executed have the same versions as specified in the thread. You can check the versions through these commands.

import langchain
import pydantic

Hi Adam, Thank you for your response. I used Google Colab. Here is the langchain and pydantic version that I installed: !pip install pydantic==1.10.8
!pip install langchain==0.0.312

OK, on Colab I have not tested. Try adding this too,

!pip install openapi-schema-pydantic==1.2.4

Hi Adam, It’s work now. Thannk you.

Thanks Adam!