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

pip安装 报错 ‘dataclass() got an unexpected keyword argument 'match_args'’ #135

Open
lowendplayer opened this issue Aug 15, 2024 · 0 comments

Comments

@lowendplayer
Copy link

系统 Windows Server 2022
python 3.12.5
报错:
PS C:\meme> meme download
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Python\Python312\Scripts\meme.exe_main
.py", line 4, in
File "C:\Python\Python312\Lib\site-packages\meme_generator_init
.py", line 4, in
from meme_generator.manager import add_meme as add_meme
File "C:\Python\Python312\Lib\site-packages\meme_generator\manager.py", line 11, in
from .meme import CommandShortcut, Meme, MemeArgsType, MemeFunction, MemeParamsType
File "C:\Python\Python312\Lib\site-packages\meme_generator\meme.py", line 50, in
class ParserOption(BaseModel):
File "C:\Python\Python312\Lib\site-packages\pydantic\main.py", line 205, in new
fields[ann_name] = ModelField.infer(
^^^^^^^^^^^^^^^^^
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 491, in infer
return cls(
^^^^
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 421, in init
self.prepare()
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 542, in prepare
self.populate_validators()
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 804, in populate_validators
*(get_validators() if get_validators else list(find_validators(self.type_, self.model_config))),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Python312\Lib\site-packages\pydantic\validators.py", line 683, in find_validators
yield from make_dataclass_validator(type_, config)
File "C:\Python\Python312\Lib\site-packages\pydantic\dataclasses.py", line 276, in make_dataclass_validator
cls = dataclass(cls, config=config, **stdlib_dataclass_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: dataclass() got an unexpected keyword argument 'match_args'
PS C:\meme> meme -h
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Python\Python312\Scripts\meme.exe_main
.py", line 4, in
File "C:\Python\Python312\Lib\site-packages\meme_generator_init
.py", line 4, in
from meme_generator.manager import add_meme as add_meme
File "C:\Python\Python312\Lib\site-packages\meme_generator\manager.py", line 11, in
from .meme import CommandShortcut, Meme, MemeArgsType, MemeFunction, MemeParamsType
File "C:\Python\Python312\Lib\site-packages\meme_generator\meme.py", line 50, in
class ParserOption(BaseModel):
File "C:\Python\Python312\Lib\site-packages\pydantic\main.py", line 205, in new
fields[ann_name] = ModelField.infer(
^^^^^^^^^^^^^^^^^
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 491, in infer
return cls(
^^^^
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 421, in init
self.prepare()
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 542, in prepare
self.populate_validators()
File "C:\Python\Python312\Lib\site-packages\pydantic\fields.py", line 804, in populate_validators
*(get_validators() if get_validators else list(find_validators(self.type, self.model_config))),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Python312\Lib\site-packages\pydantic\validators.py", line 683, in find_validators
yield from make_dataclass_validator(type_, config)
File "C:\Python\Python312\Lib\site-packages\pydantic\dataclasses.py", line 276, in make_dataclass_validator
cls = dataclass(_cls, config=config, **stdlib_dataclass_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: dataclass() got an unexpected keyword argument 'match_args'

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