airbytehq / airbytehq/PyAirbyte

[source-mailchimp] AirbyteMessage object has no attribute 'json' during API Key Config Setup in PyAirbyte

Aperta
#446 1 commento 8 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
344
Fork
77
Merge medio
1g 11h
PR unite (30g)
35

Descrizione

### Connector Name

source-mailchimp

### Connector Version

1.0.0

### What step the error happened?

Configuring a new connector

### Relevant information

The check() method in Airbyte's connector fails to validate configurations with API key-based authentication, triggering an `AirbyteConnectorCheckFailedError`. Logs reveal an underlying `AttributeError` in `source_mailchimp`, where an `AirbyteMessage` object lacks the json attribute.

I'm using the open-source airbyte versión 0.19.1 (with pip install airbyte).

```python

import airbyte as ab

source = ab.get_source('source-mailchimp')
config = {
"credentials" : {
"auth_type": "apikey",
"apikey": apikey_value
}

}

source.set_config(config=config)
source.check()

```

### Relevant log output

```
"error":{"message":"Something went wrong in the connector. See the logs for more details.","internal_message":"'AirbyteMessage' object has no attribute 'json'"

AirbyteConnectorCheckFailedError
Cell In[4], line 13
4 config = {
5 "credentials" : {
6 "auth_type": "apikey",
(...)
9
10 }
12 source.set_config(config=config)
---> 13 source.check()
15 #print(source._discover())

File ~/Documents/git/connectors/airbyte-mailchimp/lib/python3.10/site-packages/airbyte/_connector_base.py:336, in ConnectorBase.check(self)
330 raise exc.AirbyteConnectorCheckFailedError(
331 connector_name=self.name,
332 message="The connector `check` operation did not return a status.",
333 log_text=self._last_log_messages,
334 )
335 except exc.AirbyteConnectorFailedError as ex:
--> 336 raise exc.AirbyteConnectorCheckFailedError(
337 connector_name=self.name,
338 original_exception=ex,
339 ) from None
...
```

### Contribute

- [ ] Yes, I want to contribute

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.