Issue with NetSuite Connector Date Parsing

Summary

The user is facing an issue with the NetSuite connector in Python, specifically with date parsing resulting in a ‘java.text.ParseException’. The date causing the error is the start date configured for the connector, not the date received from the NetSuite object. The user suspects it might be an issue in the Python CDK.


Question

Hello <#C021JANJ6TY|> hope you well, I’m facing an issue with NetSuite connector (REST, Python connector) with java.text.ParseException: Unparseable date: "2024-03-04". (detailed stacktrace in thread) however what is strange this date is a start-date that I configured for connector, not the date I receive from Netsuite object. Can it be that it’s an issue in Python CDK?



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["netsuite-connector", "python-connector", "date-parsing", "java.text.ParseException", "python-cdk"]

Full stack trace:

2024-09-04 15:55:11 source &gt; Syncing stream: customer 
2024-09-04 15:55:11 source &gt; Stream `customer`: cannot read using date format `%m/%d/%Y
2024-09-04 15:55:11 source &gt; Stream `customer`: retry using next date format `%Y-%m-%d
2024-09-04 15:55:11 source &gt; Stream `customer`: cannot read using date format `%Y-%m-%d
2024-09-04 15:55:11 source &gt; DATE FORMAT exception. Cannot read using known formats ['%m/%d/%Y', '%Y-%m-%d']
2024-09-04 15:55:11 source &gt; Stream `customer`: INVALID_PARAMETER error occured, full error message: Invalid search query. Detailed unprocessed description follows. Search error occurred: Parse of date/time "2024-03-04" failed with date format "dd.MM.yy" in time zone America/Los_Angeles
Caused by:
        java.text.ParseException: Unparseable date: "2024-03-04".
2024-09-04 15:55:11 source &gt; Encountered an exception while reading stream customer
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 115, in read
    yield from self._read_stream(
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 184, in _read_stream
    for record in record_iterator:
  File "/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py", line 237, in _read_incremental
    for _slice in slices:
  File "/airbyte/integration_code/source_netsuite/streams.py", line 280, in stream_slices
    slice_start = start.strftime(self.default_datetime_format)
  File "/airbyte/integration_code/source_netsuite/streams.py", line 54, in default_datetime_format
    return NETSUITE_INPUT_DATE_FORMATS[self.index_datetime_format]
IndexError: list index out of range
2024-09-04 15:55:11 source &gt; Finished syncing customer
2024-09-04 15:55:11 source &gt; SourceNetsuite runtimes:
Syncing stream customer 0:00:00.466422
2024-09-04 15:55:11 source &gt; list index out of range```

I can’t understand where this error is coming from Parse of date/time "2024-03-04" failed with date format "<http://dd.MM|dd.MM>.yy" in time zone America/Los_Angeles and I’m definitely not in LA :sunglasses:

given this issue apparently the NetSuite connector is broken / does not work?

I also see this long-open bug https://github.com/airbytehq/airbyte/issues/21965