Skip to content

3.0.0: client.actor(...).get() fails with validation errors #811

Closed

Description

@zhemaituk

Steps:

client = ApifyClientAsync(token)
await client.actor("apify/facebook-pages-scraper").get()

Result:

{ValidationError}3 validation errors for ActorResponse
data.pricingInfos.2.PRICE_PER_DATASET_ITEM.pricePerUnitUsd
  Field required [type=missin...', 'e... 'isPrimaryEvent': True}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.13/v/missing

Activity

  1. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on May 21, 2026
  2. zhemaituk commented on May 21, 2026

    @zhemaituk
    Author

    One more:

    await (await actor.default_build()).get()
    

    Result:

    {ValidationError}1 validation error for BuildResponse
    data.actorDefinition.version
      String should match pattern '^[0-9]+\.[0-9]+$' [type=strin...put_value='0.0.1', input_type=str]
        For further information visit https://errors.pydantic.dev/2.13/v/string_pattern_mismatch
    
  3. zhemaituk commented on May 21, 2026

    @zhemaituk
    Author

    Generally 3.0.0 feels undercooked. Encountered above issues in just a few minutes of usage.

    A few other items:

    _models and _literals are marked as protected (_name), but documentation suggests it's public API (e.g. here https://docs.apify.com/api/client/python/docs/upgrading/upgrading-to-v3).

    Field names are inconsistent. E.g. BuildShort.buildNumber is available camelCase only, no build_number.

  4. self-assigned this
    on May 22, 2026
  5. vdusek commented on May 22, 2026

    @vdusek
    Contributor

    Hi @zhemaituk, thank you for reporting this, and sorry for the inconvenience.

    In this major release, we made a big step forward by adding Pydantic models for all outputs (API responses). However, it looks like there are still some discrepancies between the OpenAPI specs and the actual API behaviour. Since the models and types are generated from the OpenAPI specs, these discrepancies can, unfortunately, result in validation errors like this one.

    I'm looking into it and will try to resolve them as soon as possible.

  6. added a commit that references this issue on May 22, 2026
    c3ea8c1
  7. vdusek commented on May 22, 2026

    @vdusek
    Contributor

    @zhemaituk, please try the new patch version: https://pypi.org/project/apify-client/3.0.1/

    It includes fixes for the issues you reported, along with a few more. I also updated the upgrade guide so it no longer mentions internal modules, to avoid confusion about what is and isn't part of the public interface and safe to import.

    Thank you.

  8. zhemaituk commented on May 22, 2026

    @zhemaituk
    Author

    Thank you for the quick turnaround! Works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions