airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

[source-quickbooks] Trying to set-up quickbooks

Open csphereholdings opened this issue 1 year ago • 3 comments

Connector Name

destination-quickbooks

Connector Version

3.0.17

What step the error happened?

Configuring a new connector

Relevant information

System: Windows Version: Community Fresh install of Airbyte and Docker.

Steps taken:

  1. Installed Docker
  2. Installed Airbyte
  3. Logged In
  4. Selected New Source
  5. Selected Marketplace
  6. Filled out settings

Received this error: "Unable to connect to stream accounts - 'str' object has no attribute 'eval'"

Logs pasted below.

Any advice appreciated!

Relevant log output

2024-08-17 20:53:42 [32mINFO[m i.a.w.l.p.s.m.Stage(apply):39 - APPLY Stage: CLAIM — (workloadId = cf9c4355-b171-4477-8f2d-6c5cc5fc8b7e_0484d460-3449-4070-bfdc-40cf509bac4f_0_check) — (dataplaneId = local)
2024-08-17 20:54:05 [32mINFO[m i.a.c.i.LineGobbler(voidCall):166 - 
2024-08-17 20:54:06 [32mINFO[m i.a.c.i.LineGobbler(voidCall):166 - ----- START CHECK -----
2024-08-17 20:54:06 [32mINFO[m i.a.c.i.LineGobbler(voidCall):166 - 
2024-08-17 20:54:20 [32mINFO[m i.a.c.ConnectorWatcher(run):87 - Connector exited, processing output
2024-08-17 20:54:20 [32mINFO[m i.a.c.ConnectorWatcher(run):90 - Output file jobOutput.json found
2024-08-17 20:54:20 [32mINFO[m i.a.c.ConnectorWatcher(run):96 - Connector exited with 0
2024-08-17 20:54:20 [32mINFO[m i.a.w.i.VersionedAirbyteStreamFactory(create):189 - Reading messages from protocol version 0.2.0
2024-08-17 20:54:20 [33mWARN[m i.a.m.l.MetricClientFactory(getMetricClient):43 - MetricClient has not been initialized. Must call MetricClientFactory.CreateMetricClient before using MetricClient. Using a dummy client for now. Ignore this if Airbyte is configured to not publish any metrics.
2024-08-17 20:54:21 [1;31mERROR[m i.a.w.i.VersionedAirbyteStreamFactory(internalLog):304 - Encountered an error trying to connect to stream accounts. Error: 
 Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/checks/check_stream.py", line 42, in check_connection
    stream_is_available, reason = availability_strategy.check_availability(stream, logger, source)
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/streams/http/availability_strategy.py", line 50, in check_availability
    get_first_record_for_slice(stream, stream_slice)
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/streams/utils/stream_helper.py", line 40, in get_first_record_for_slice
    return next(records_for_slice)
  File "/usr/local/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 "/usr/local/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/retrievers/simple_retriever.py", line 339, in read_records
    self.cursor.close_slice(_slice, most_recent_record_from_slice)
  File "/airbyte/integration_code/source_quickbooks/components.py", line 72, in close_slice
    most_recent_record=LastRecordDictProxy(most_recent_record, {self.cursor_field.eval(self.config): "MetaData/LastUpdatedTime"}),
AttributeError: 'str' object has no attribute 'eval'

2024-08-17 20:54:21 [1;31mERROR[m i.a.w.i.VersionedAirbyteStreamFactory(internalLog):304 - Check failed
2024-08-17 20:54:21 [32mINFO[m i.a.c.ConnectorMessageProcessor(updateConfigFromControlMessage):231 - Checking for optional control message...
2024-08-17 20:54:21 [32mINFO[m i.a.c.ConnectorMessageProcessor(updateConfigFromControlMessage):253 - Optional control message not found. Skipping...
2024-08-17 20:54:21 [32mINFO[m i.a.c.ConnectorWatcher(run):134 - Writing output of cf9c4355-b171-4477-8f2d-6c5cc5fc8b7e_0484d460-3449-4070-bfdc-40cf509bac4f_0_check to the doc store
2024-08-17 20:54:21 [32mINFO[m i.a.c.ConnectorWatcher(run):136 - Marking workload as successful
2024-08-17 20:54:21 [32mINFO[m i.a.c.ConnectorWatcher(exitProperly):189 - Deliberately exiting process with code 0.
2024-08-17 20:54:21 [32mINFO[m i.a.c.i.LineGobbler(voidCall):166 - 
2024-08-17 20:54:21 [32mINFO[m i.a.c.i.LineGobbler(voidCall):166 - ----- END CHECK -----
2024-08-17 20:54:21 [32mINFO[m i.a.c.i.LineGobbler(voidCall):166 -

Contribute

  • [ ] Yes, I want to contribute

csphereholdings avatar Aug 17 '24 21:08 csphereholdings

To clarify, you're talking about source-quickbooks, not a destination, right?

natikgadzhi avatar Aug 20 '24 22:08 natikgadzhi

@natikgadzhi Confirmed.

csphereholdings avatar Aug 20 '24 22:08 csphereholdings

Alright @pabloescoder is on the case. ;)

natikgadzhi avatar Aug 20 '24 22:08 natikgadzhi

The issue seems to be in OSS only.

I don't know the code base. However, at first glance, it seems like __post_init__ is not invoked correctly/timely at https://github.com/airbytehq/airbyte/blob/master/airbyte-cdk/python/airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py#L92 that converts self.cursor_field to InterpolatedString from string.

Is it because of the inheritance at https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-quickbooks/source_quickbooks/components.py#L55C7-L55C32

tsybanov avatar Sep 28 '24 12:09 tsybanov

I agree, it's OSS only because there is no support only in the main application at this time, likely because this connector has not worked in awhile.

Hoping we can have this connector work soon! If there's anything we can do to help let us know - if someone understands the issue, we may be able to commit some resources to resolving.

csphereholdings avatar Sep 30 '24 14:09 csphereholdings

Hi all, I'm getting this same error when trying to set up the qb source! As far as the connection goes, it was working for me last month.

Check Connection Source Failure.txt My versions CleanShot 2024-10-23 at 11 44 31

solidpro-devops avatar Oct 23 '24 15:10 solidpro-devops

@solidpro-devops 3.0.26 solves this issue.

pabloescoder avatar Nov 26 '24 05:11 pabloescoder