Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

[BUG] ModuleNotFoundError: No module named 'typing_inspect' #294

Open
a1d4r opened this issue May 22, 2024 · 0 comments
Open

[BUG] ModuleNotFoundError: No module named 'typing_inspect' #294

a1d4r opened this issue May 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@a1d4r
Copy link

a1d4r commented May 22, 2024

Describe the bug

Cannot import cbv due to missing dependency

  File "...py", line 4, in <module>
    from fastapi_restful.cbv import cbv
  File "/Users/aidar/.pyenv/versions/3.12.3/envs/.../lib/python3.12/site-packages/fastapi_restful/__init__.py", line 4, in <module>
    from .cbv_base import Api, Resource, set_responses, take_init_parameters
  File "/Users/aidar/.pyenv/versions/3.12.3/envs/.../lib/python3.12/site-packages/fastapi_restful/cbv_base.py", line 5, in <module>
    from .cbv import INCLUDE_INIT_PARAMS_KEY, RETURN_TYPES_FUNC_KEY, _cbv
  File "/Users/aidar/.pyenv/versions/3.12.3/envs/.../lib/python3.12/site-packages/fastapi_restful/cbv.py", line 21, in <module>
    from typing_inspect import is_classvar
ModuleNotFoundError: No module named 'typing_inspect'

To Reproduce
Steps to reproduce the behavior:

  1. Import cbv: from fastapi_restful.cbv import cbv

Expected behavior
No error ocurred

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • OS: macOS
  • Python 3.12.3
  • pydantic 2.7.1
  • fastapi 0.111.0
  • fastapi-restful 0.6.0

Additional context
typing_inspect marked as optional package. However, it is required when using pydantic v2.

@a1d4r a1d4r added the bug Something isn't working label May 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant