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

CI failing while importing spacy on "TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard" #4249

Closed
marco-c opened this issue Jun 9, 2024 · 0 comments · Fixed by #4250
Assignees

Comments

@marco-c
Copy link
Collaborator

marco-c commented Jun 9, 2024

tests/test_trainer.py:9: in <module>
    from scripts import trainer
scripts/trainer.py:11: in <module>
    from bugbug.models import MODELS, get_model_class
bugbug/models/__init__.py:6: in <module>
    from bugbug.model import Model
bugbug/model.py:32: in <module>
    from bugbug.nlp import SpacyVectorizer
bugbug/nlp.py:21: in <module>
    import spacy
/usr/local/lib/python3.12/site-packages/spacy/__init__.py:13: in <module>
    from . import pipeline  # noqa: F401
/usr/local/lib/python3.12/site-packages/spacy/pipeline/__init__.py:1: in <module>
    from .attributeruler import AttributeRuler
/usr/local/lib/python3.12/site-packages/spacy/pipeline/attributeruler.py:8: in <module>
    from ..language import Language
/usr/local/lib/python3.12/site-packages/spacy/language.py:43: in <module>
    from .pipe_analysis import analyze_pipes, print_pipe_analysis, validate_attrs
/usr/local/lib/python3.12/site-packages/spacy/pipe_analysis.py:6: in <module>
    from .tokens import Doc, Span, Token
/usr/local/lib/python3.12/site-packages/spacy/tokens/__init__.py:1: in <module>
    from ._serialize import DocBin
/usr/local/lib/python3.12/site-packages/spacy/tokens/_serialize.py:14: in <module>
    from ..vocab import Vocab
spacy/vocab.pyx:1: in init spacy.vocab
    ???
spacy/tokens/doc.pyx:49: in init spacy.tokens.doc
    ???
/usr/local/lib/python3.12/site-packages/spacy/schemas.py:195: in <module>
    class TokenPatternString(BaseModel):
/usr/local/lib/python3.12/site-packages/pydantic/v1/main.py:286: in __new__
    cls.__try_update_forward_refs__()
/usr/local/lib/python3.12/site-packages/pydantic/v1/main.py:807: in __try_update_forward_refs__
    update_model_forward_refs(cls, cls.__fields__.values(), cls.__config__.json_encoders, localns, (NameError,))
/usr/local/lib/python3.12/site-packages/pydantic/v1/typing.py:554: in update_model_forward_refs
    update_field_forward_refs(f, globalns=globalns, localns=localns)
/usr/local/lib/python3.12/site-packages/pydantic/v1/typing.py:529: in update_field_forward_refs
    update_field_forward_refs(sub_f, globalns=globalns, localns=localns)
/usr/local/lib/python3.12/site-packages/pydantic/v1/typing.py:520: in update_field_forward_refs
    field.type_ = evaluate_forwardref(field.type_, globalns, localns or None)
/usr/local/lib/python3.12/site-packages/pydantic/v1/typing.py:66: in evaluate_forwardref
    return cast(Any, type_)._evaluate(globalns, localns, set())
E   TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
@marco-c marco-c self-assigned this Jun 9, 2024
marco-c added a commit to marco-c/bugbug that referenced this issue Jun 9, 2024
Works around an issue with Pydantic, and it's good in its own right to match the version used in the Docker files

Fixes mozilla#4249
marco-c added a commit that referenced this issue Jun 9, 2024
Works around an issue with Pydantic, and it's good in its own right to match the version used in the Docker files

Fixes #4249
olewicki pushed a commit that referenced this issue Jun 14, 2024
Works around an issue with Pydantic, and it's good in its own right to match the version used in the Docker files

Fixes #4249
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

Successfully merging a pull request may close this issue.

1 participant