actor-templates icon indicating copy to clipboard operation
actor-templates copied to clipboard

Update dependencies in AI templates

Open jirispilka opened this issue 2 months ago • 1 comments

jirispilka avatar Oct 06 '25 21:10 jirispilka

Btw there is also some error that doesn't fail the run correctly in one of the AI templates (so the template tests are passing regardless of it):

Run: /tmp/python-langgraph6iHR8k/.venv/bin/python3 -m src
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/tmp/python-langgraph6iHR8k/src/__main__.py", line 3, in <module>
    from .main import main
  File "/tmp/python-langgraph6iHR8k/src/main.py", line 13, in <module>
    from apify import Actor
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/apify/__init__.py", line 4, in <module>
    from crawlee import Request
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/crawlee/__init__.py", line 3, in <module>
    from ._request import Request, RequestOptions
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/crawlee/_request.py", line 11, in <module>
    from crawlee._types import EnqueueStrategy, HttpHeaders, HttpMethod, HttpPayload, JsonSerializable
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/crawlee/_types.py", line 69, in <module>
    class HttpHeaders(RootModel, Mapping[str, str]):
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py", line 242, in __new__
    set_model_fields(cls, config_wrapper=config_wrapper, ns_resolver=ns_resolver)
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py", line 566, in set_model_fields
    fields, class_vars = collect_model_fields(cls, config_wrapper, ns_resolver, typevars_map=typevars_map)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/pydantic/_internal/_fields.py", line 364, in collect_model_fields
    field_info = FieldInfo_.from_annotated_attribute(ann_type, assigned_value, _source=AnnotationSource.CLASS)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/pydantic/fields.py", line 443, in from_annotated_attribute
    field_info = FieldInfo._construct(
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/pydantic/fields.py", line 519, in _construct
    merged_field_info = cls(**merged_kwargs)
                        ^^^^^^^^^^^^^^^^^^^^
  File "/tmp/python-langgraph6iHR8k/.venv/lib/python3.12/site-packages/pydantic/fields.py", line 232, in __init__
Error:     raise TypeError('cannot specify both default and default_factory')

https://github.com/apify/actor-templates/actions/runs/18329967646/job/52202971631#step:7:232

spotted thanks to GH annotations

Image

B4nan avatar Oct 08 '25 04:10 B4nan