Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeError: _eval_type() missing 1 required positional argument: 'type_params' with import module #118418

Closed
Labels
3.12only security fixes3.13bugs and security fixestopic-typingtype-bugAn unexpected behavior, bug, or error
@enefry

Description

@enefry

Bug report

What happened?

importopenai
Traceback (most recent call last):  File"<stdin>", line1, in<module>  File"/usr/local/lib/python3.12/site-packages/openai/__init__.py", line8, in<module>from .import types  File"/usr/local/lib/python3.12/site-packages/openai/types/__init__.py", line5, in<module>from .batchimport Batchas Batch  File"/usr/local/lib/python3.12/site-packages/openai/types/batch.py", line7, in<module>from .._modelsimport BaseModel  File"/usr/local/lib/python3.12/site-packages/openai/_models.py", line35, in<module>from ._utilsimport (  File"/usr/local/lib/python3.12/site-packages/openai/_utils/__init__.py", line3, in<module>from ._utilsimport (  File"/usr/local/lib/python3.12/site-packages/openai/_utils/_utils.py", line24, in<module>from .._compatimport parse_dateas parse_date, parse_datetimeas parse_datetime  File"/usr/local/lib/python3.12/site-packages/openai/_compat.py", line48, in<module>from pydantic.v1.typingimport (  File"/usr/local/lib/python3.12/site-packages/pydantic/v1/__init__.py", line7, in<module>from .env_settingsimport BaseSettings  File"/usr/local/lib/python3.12/site-packages/pydantic/v1/env_settings.py", line23, in<module>classBaseSettings(BaseModel):  File"/usr/local/lib/python3.12/site-packages/pydantic/v1/main.py", line178, in__new__    annotations= resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__',None))^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/local/lib/python3.12/site-packages/pydantic/v1/typing.py", line400, inresolve_annotations    value= _eval_type(value, base_globals,None)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
importfastapi
Traceback (most recent call last):  File"<stdin>", line1, in<module>  File"/usr/local/lib/python3.12/site-packages/fastapi/__init__.py", line7, in<module>from .applicationsimport FastAPIas FastAPI  File"/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line16, in<module>from fastapiimport routing  File"/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line22, in<module>from fastapiimport params  File"/usr/local/lib/python3.12/site-packages/fastapi/params.py", line5, in<module>from fastapi.openapi.modelsimport Example  File"/usr/local/lib/python3.12/site-packages/fastapi/openapi/models.py", line68, in<module>classContact(BaseModelWithConfig):  File"/usr/local/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py", line197, in__new__    set_model_fields(cls, bases, config_wrapper, types_namespace)  File"/usr/local/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py", line474, inset_model_fields    fields, class_vars= collect_model_fields(cls, bases, config_wrapper, types_namespace,typevars_map=typevars_map)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/local/lib/python3.12/site-packages/pydantic/_internal/_fields.py", line131, incollect_model_fields    type_hints= get_cls_type_hints_lenient(cls, types_namespace)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/local/lib/python3.12/site-packages/pydantic/_internal/_typing_extra.py", line226, inget_cls_type_hints_lenient    hints[name]= eval_type_lenient(value, globalns, localns)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/local/lib/python3.12/site-packages/pydantic/_internal/_typing_extra.py", line238, ineval_type_lenientreturn eval_type_backport(value, globalns, localns)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/usr/local/lib/python3.12/site-packages/pydantic/_internal/_typing_extra.py", line255, ineval_type_backportreturn typing._eval_type(value, globalns, localns)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^TypeError:_eval_type() missing 1 required positional argument: 'type_params'

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.12.3+ (heads/3.12-dirty:817190c, Apr 29 2024, 12:17:20) [GCC 11.4.0]

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixestopic-typingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp