airbytehq / airbytehq/airbyte

[source-netsuite] fails on get_availale_streams because of a missing property

Đang mở
#72,425 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
area/connectors autoteam community connectors/source/netsuite needs-triage team/extensibility team/use type/bug
Ngôn ngữ chính
Python
Star
22.1k
Fork
5.3k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### Connector Name

source-netsuite

### Connector Version

0.1.3

### What step the error happened?

During the sync

### Relevant information

`AttributeError: 'IncrementalNetsuiteStream' object has no attribute '_session'`

I have encountered this error in multiple environments. The log was collected from a clean Python 3.11.13 devcontaner with airbyte 0.36.1 and airbyte-source-netsuite 0.1.3.

Creation of a source object and `source.check()` are successful. I get this error on the next line when running `source.get_available_streams()`. Here is the relevant code:

```python
source: ab.Source = ab.get_source("source-netsuite")

# Configure the source
source.set_config(
config={
"consumer_key": consumer_key,
"consumer_secret": consumer_secret,
"token_key": token_key,
"token_secret": token_secret,
"realm": realm,
"start_datetime": "2025-01-01T00:00:00Z",
"window_in_days": 5,
"object_types": [
"customer"
]
},
)

# Verify the config and creds by running `check`:
source.check()

source.get_available_streams()
```

### Relevant log output

```shell
2026-01-28 20:43:24 - INFO - Check succeeded
2026-01-28 20:43:34 - INFO - 'IncrementalNetsuiteStream' object has no attribute '_session'
Traceback (most recent call last):
File "/workspaces/airbyte-netsuite/.venv/bin/source-netsuite", line 7, in
sys.exit(run())
^^^^^
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/source_netsuite/run.py", line 14, in run
launch(source, sys.argv[1:])
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py", line 377, in launch
for message in source_entrypoint.run(parsed_args):
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py", line 199, in run
yield from map(
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py", line 266, in discover
catalog = self.source.discover(self.logger, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/sources/abstract_source.py", line 89, in discover
streams = [stream.as_airbyte_stream() for stream in self.streams(config=config)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/sources/abstract_source.py", line 89, in
streams = [stream.as_airbyte_stream() for stream in self.streams(config=config)]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/sources/streams/core.py", line 309, in as_airbyte_stream
json_schema=dict(self.get_json_schema()),
^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/source_netsuite/streams.py", line 122, in get_json_schema
schema = self.get_schema(META_PATH + self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/source_netsuite/streams.py", line 84, in get_schema
resp = self._session.get(url=self.url_base + ref, headers=SCHEMA_HEADERS)
^^^^^^^^^^^^^
AttributeError: 'IncrementalNetsuiteStream' object has no attribute '_session'
2026-01-28 20:43:34 - ERROR - Something went wrong in the connector. See the logs for more details.
2026-01-28 20:43:34 - INFO - {"type":"TRACE","trace":{"type":"ERROR","emitted_at":1769633014217,"error":{"message":"Something went wrong in the connector. See the logs for more details.","internal_message":"'IncrementalNetsuiteStream' object has no attribute '_session'","stack_trace":"Traceback (most recent call last):\n File \"/workspaces/airbyte-netsuite/.venv/bin/source-netsuite\", line 7, in \n sys.exit(run())\n ^^^^^\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/source_netsuite/run.py\", line 14, in run\n launch(source, sys.argv[1:])\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py\", line 377, in launch\n for message in source_entrypoint.run(parsed_args):\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py\", line 199, in run\n yield from map(\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/entrypoint.py\", line 266, in discover\n catalog = self.source.discover(self.logger, config)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/sources/abstract_source.py\", line 89, in discover\n streams = [stream.as_airbyte_stream() for stream in self.streams(config=config)]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/sources/abstract_source.py\", line 89, in \n streams = [stream.as_airbyte_stream() for stream in self.streams(config=config)]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/airbyte_cdk/sources/streams/core.py\", line 309, in as_airbyte_stream\n json_schema=dict(self.get_json_schema()),\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/source_netsuite/streams.py\", line 122, in get_json_schema\n schema = self.get_schema(META_PATH + self.name)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/workspaces/airbyte-netsuite/.venv/lib/python3.11/site-packages/source_netsuite/streams.py\", line 84, in get_schema\n resp = self._session.get(url=self.url_base + ref, headers=SCHEMA_HEADERS)\n ^^^^^^^^^^^^^\nAttributeError: 'IncrementalNetsuiteStream' object has no attribute '_session'\n","failure_type":"system_error"}}}
```

### Contribute

- [ ] Yes, I want to contribute

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11086

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.