Hello. I was trying to use this utility with a Python 3.14.3 script. When I tried to run the code, the following error arose
File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 759, in exec_module
File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
File "django\project\app\models.py", line 9, in <module>
from cfdibills.schemas.cfdi33 import CFDI33
File "path\to\virtual\environment\Lib\site-packages\cfdibills\__init__.py", line 4, in <module>
from .io import read_xml
File "path\to\virtual\environment\Lib\site-packages\cfdibills\io.py", line 15, in <module>
from cfdibills.schemas.cfdi33 import CFDI33
File "path\to\virtual\environment\Lib\site-packages\cfdibills\schemas\__init__.py", line 4, in <module>
from . import cfdi33, cfdi40
File "path\to\virtual\environment\Lib\site-packages\cfdibills\schemas\cfdi33.py", line 25, in <module>
from cfdibills.schemas.complementos import ComplementoType
File "path\to\virtual\environment\Lib\site-packages\cfdibills\schemas\complementos.py", line 50, in <module>
class Aerolineas(BaseModel):
...<35 lines>...
otros_cargos: Optional[OtrosCargos]
File "path\to\virtual\environment\Lib\site-packages\cfdibills\schemas\complementos.py", line 58, in Aerolineas
class OtrosCargos(BaseModel):
...<18 lines>...
_to_array = reusable_validator("cargo", pre=True)(dict2list)
File "path\to\virtual\environment\Lib\site-packages\pydantic\main.py", line 249, in __new__
vg.check_for_unused()
~~~~~~~~~~~~~~~~~~~^^
File "path\to\virtual\environment\Lib\site-packages\pydantic\class_validators.py", line 176, in check_for_unused
raise ConfigError(
...<2 lines>...
)
pydantic.errors.ConfigError: Validators defined with incorrect fields: dict2list (use check_fields=False if you're inheriting from the model and intended this)```
Apparently, it rises out of `schemas\complementos.py` line 86, where OtrosCargos is not recognized as a valid model. But I'm not sure.
Hello. I was trying to use this utility with a Python 3.14.3 script. When I tried to run the code, the following error arose