airbytehq / airbytehq/airbyte

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

Abierto
#72,425 3 comentarios 0 reacciones 0 asignados Ver en GitHub
area/connectors autoteam community connectors/source/netsuite needs-triage team/extensibility team/use type/bug
Lenguaje dominante
Python
Estrellas
22.1k
Forks
5.3k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.