Error in Source-Github Connector Configuration

Summary

The error occurred in the Source-Github connector configuration when trying to set streams, resulting in a deprecation warning and a failed connector. The logs provide more details for investigation.


Question

code:
import airbyte as ab

# Create and configure the source:
source = ab.get_source(
"source-github",
install_if_missing=True,
config={
"repositories": ["airbytehq/quickstarts"],
"credentials": {
"personal_access_token": ab.get_secret("GITHUB_PERSONAL_ACCESS_TOKEN"),
},
},
)

# Verify the config and creds by running check:
source.check()
source.set_streams(["pull_requests", "issues", "reviews", "stargazers"])

# Read into DuckDB local default cache
cache = ab.get_default_cache()
result = source.read(cache=cache)

error:
Writing PyAirbyte logs to file: C:\Users\OBAIDM~1\AppData\Local\Temp\airbyte\logs\2024-09-27\airbyte-log-J8SKMYTPJ.log
Writing source-github logs to file: C:\Users\OBAIDM~1\AppData\Local\Temp\airbyte\logs\source-github\source-github-log-J8SKMYTQ6.log
Connection check succeeded for source-github.
C:\Users\Obaid Muneer\Desktop\prosp\ai-sdk-internal-knowledge-base\backend_py\github.py:17: DeprecationWarning: The ‘set_streams’ method is deprecated and will be removed in a future version. Please use the ‘select_streams’ method instead.
source.set_streams([“pull_requests”, “issues”, “reviews”, “stargazers”])
ERROR: Something went wrong in the connector. See the logs for more details.
Traceback (most recent call last):
File “C:\Users\Obaid Muneer\Desktop\prosp\ai-sdk-internal-knowledge-base\backend_py\github.py”, line 17, in <module>
source.set_streams([“pull_requests”, “issues”, “reviews”, “stargazers”])
File “C:\Users\Obaid Muneer\AppData\Local\Programs\Python\Python311\Lib\site-packages\airbyte\sources\base.py”, line 99, in set_streams
self.select_streams(streams)
File “C:\Users\Obaid Muneer\AppData\Local\Programs\Python\Python311\Lib\site-packages\airbyte\sources\base.py”, line 147, in select_streams
available_streams = self.get_available_streams()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Obaid Muneer\AppData\Local\Programs\Python\Python311\Lib\site-packages\airbyte\sources\base.py”, line 219, in get_available_streams
return [s.name for s in self.discovered_catalog.streams]
^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Obaid Muneer\AppData\Local\Programs\Python\Python311\Lib\site-packages\airbyte\sources\base.py”, line 325, in discovered_catalog
self._discovered_catalog = self._discover()
^^^^^^^^^^^^^^^^
File “C:\Users\Obaid Muneer\AppData\Local\Programs\Python\Python311\Lib\site-packages\airbyte\sources\base.py”, line 209, in _discover
for msg in self._execute([“discover”, “–config”, config_file]):
File “C:\Users\Obaid Muneer\AppData\Local\Programs\Python\Python311\Lib\site-packages\airbyte_connector_base.py”, line 440, in _execute
raise exc.AirbyteConnectorFailedError(
airbyte.exceptions.AirbyteConnectorFailedError: Connector failed. (AirbyteConnectorFailedError)

AirbyteConnectorFailedError: Connector failed.
Please review the log file for more information.
Connector Name: ‘source-github’
Exit Code: 1
Log file: C:\Users\OBAIDM~1\AppData\Local\Temp\airbyte\logs\source-github\source-github-log-J8SKMYTQ6.log

would be apricated for help



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

["source-github", "connector", "set-streams", "deprecation-warning", "connector-failed", "logs"]

Connector fails to run discover operation. Hypothetically likely that your API token does not have the right permissions.

But if its token permissions problem, we want connectors to fail check instead. If you make a full permissions token and it works, please file an issue for us to fix the check on source-GitHub, and provide details on which scopes your previous token had