Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running example results in ImportError: cannot import name 'GenericModel' from 'pydantic.generics' error. #8

Open
payneio opened this issue Jul 6, 2023 · 0 comments

Comments

@payneio
Copy link

payneio commented Jul 6, 2023

🐞 Problem

Just trying to run the example in the README.md. But I get:

 python .\main.py
Traceback (most recent call last):
  File "C:\Users\x\repos\google-contacts-notion\main.py", line 1, in <module>
    from notion import NotionClient
  File "C:\Users\x\repos\google-contacts-notion\env\Lib\site-packages\notion\__init__.py", line 1, in <module>
    from notion.client import NotionAsyncClient, NotionClient
  File "C:\Users\x\repos\google-contacts-notion\env\Lib\site-packages\notion\client.py", line 15, in <module>
    from notion.endpoints import (
  File "C:\Users\x\repos\google-contacts-notion\env\Lib\site-packages\notion\endpoints\__init__.py", line 1, in <module>
    from notion.endpoints.asynchronous import (
  File "C:\Users\x\repos\google-contacts-notion\env\Lib\site-packages\notion\endpoints\asynchronous.py", line 3, in <module>
    from notion.helpers import parse_block_obj, pick
  File "C:\Users\x\repos\google-contacts-notion\env\Lib\site-packages\notion\helpers.py", line 3, in <module>
    from notion.types import BLOCK_MAPPING, Block
  File "C:\Users\x\repos\google-contacts-notion\env\Lib\site-packages\notion\types.py", line 6, in <module>
    from pydantic.generics import GenericModel
ImportError: cannot import name 'GenericModel' from 'pydantic.generics' (C:\Users\x\repos\google-contacts-notion\env\Lib\site-packages\pydantic\generics.py)

Win 11.
Successfully installed annotated-types-0.5.0 anyio-3.7.1 certifi-2023.5.7 dnspython-2.3.0 email-validator-2.0.0.post2 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 idna-3.4 notion-sdk-0.7.0 pydantic-2.0.2 pydantic-core-2.1.2 sniffio-1.3.0 typing-extensions-4.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant