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

[source-freshdesk] cannot sync tickets objects pyairbyte #297

Open
1 task done
alaawerda opened this issue Jul 16, 2024 · 3 comments
Open
1 task done

[source-freshdesk] cannot sync tickets objects pyairbyte #297

alaawerda opened this issue Jul 16, 2024 · 3 comments

Comments

@alaawerda
Copy link

alaawerda commented Jul 16, 2024

Connector Name

source-freshdesk

Connector Version

0.15.0

What step the error happened?

During the sync

Relevant information

The stream tickets from Freshdesk return this error.

Relevant log output

AirbyteConnectorFailedError: AirbyteConnectorFailedError: Connector failed.

Log output: 
        Syncing stream: tickets 
    Marking stream tickets as RUNNING
    Encountered an exception while reading stream tickets
    Traceback (most recent call last):
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 135, in read
        yield from self._read_stream(
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 230, in _read_stream
        for record_data_or_message in record_iterator:
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/streams/core.py", line 169, in read
        for record_data_or_message in records:
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/declarative_stream.py", line 126, in read_records
        yield from self.retriever.read_records(self.get_json_schema(), stream_slice)
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 327, in read_records
        for stream_data in self._read_pages(record_generator, self.state, _slice):
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 297, in _read_pages
        next_page_token = self._next_page_token(response)
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 261, in _next_page_token
        return self._paginator.next_page_token(response, self._last_page_size, self._last_record)
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py", line 107, in next_page_token
        self._token = self.pagination_strategy.next_page_token(response, last_page_size, last_record)
    TypeError: FreshdeskTicketsPaginationStrategy.next_page_token() takes 3 positional arguments but 4 were given
    Marking stream tickets as STOPPED
    Something went wrong in the connector. See the logs for more details.
    Finished syncing tickets
    SourceFreshdesk runtimes:
    Syncing stream tickets 0:00:01.228051
    During the sync, the following streams did not sync successfully: tickets: AirbyteTracedException('FreshdeskTicketsPaginationStrategy.next_page_token() takes 3 positional arguments but 4 were given')
    None
    Traceback (most recent call last):
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/bin/source-freshdesk", line 10, in <module>
        sys.exit(run())
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/source_freshdesk/run.py", line 14, in run
        launch(source, sys.argv[1:])
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/entrypoint.py", line 235, in launch
        for message in source_entrypoint.run(parsed_args):
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/entrypoint.py", line 122, in run
        yield from map(AirbyteEntrypoint.airbyte_message_to_string, self.read(source_spec, config, config_catalog, state))
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/entrypoint.py", line 166, in read
        for message in self.source.read(self.logger, config, catalog, state):
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/manifest_declarative_source.py", line 167, in read
        yield from super().read(logger, config, catalog, state)
      File "/mnt/var/hadoop/tmp/nm-local-dir/usercache/trusted-service-user/appcache/application_1721148226297_0001/container_1721148226297_0001_01_000001/.venv-source-freshdesk/lib/python3.10/site-packages/airbyte_cdk/sources/abstract_source.py", line 184, in read
        raise AirbyteTracedException(message=error_message, failure_type=FailureType.config_error)
    airbyte_cdk.utils.traced_exception.AirbyteTracedException: None
    During the sync, the following streams did not sync successfully: tickets: AirbyteTracedException('FreshdeskTicketsPaginationStrategy.next_page_token() takes 3 positional arguments but 4 were given')

Contribute

  • Yes, I want to contribute

Tasks

Preview Give feedback
No tasks being tracked yet.
@marcosmarxm marcosmarxm transferred this issue from airbytehq/airbyte Jul 16, 2024
@jscheel
Copy link

jscheel commented Mar 10, 2025

This isn't a pyairbyte issue. This is a problem with the connector itself.

@jscheel
Copy link

jscheel commented Mar 11, 2025

The problem is that the connector has a very broad version specifier ^0, but the 0.x versions of the airbyte-cdk are very different from one another. To fix this, you need to pin the airbyte-cdk to a more-specific version. The current version of the connector specifies 0.72.2 in its manifest. So you can actually make this work with a hack in the pip url. For example:

source = ab.get_source(
    "source-freshdesk",
    pip_url="airbyte-source-freshdesk airbyte-cdk==0.72.2"
    install_if_missing=True,
)

@jscheel
Copy link

jscheel commented Mar 11, 2025

@aaronsteers this is interesting, because the poetry lock file in the connector specifies 0.72.2, but PyAirbyte installs 0.90.x. Assuming it doesn't follow the lock file, yeah?

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

2 participants