```2025-02-08 17:17:54 - INFO - FileNotFoundError:...
# ask-ai
t
Copy code
2025-02-08 17:17:54 - INFO - FileNotFoundError: [Errno 2] No such file or directory: ''
Traceback (most recent call last):
  File "C:\Users\Talaat\Documents\Github\test-key-vault\.venv\lib\site-packages\proxytypes.py", line 252, in __subject__
    return self.cache
  File "C:\Users\Talaat\Documents\Github\test-key-vault\.venv\lib\site-packages\proxytypes.py", line 176, in __getattribute__
    return _oga(self, attr)
AttributeError: 'JsonRef' object has no attribute 'cache'
I get this error when running the following code:
Copy code
import airbyte as ab
github = ab.get_source(
    "source-github",
    install_if_missing=True,
    config={
        "credentials": {
            "personal_access_token": "ghp_********",
            "option_title": "PAT Credentials"
        },
        "repositories": ["TalaatHasanin/mage-ai"]
    }
)
github.check()
print(github.select_all_streams())
k
Based on the information provided in the knowledge sources, I can offer some insights into your issue with the GitHub source connector in Airbyte. However, the exact error you're encountering is not directly addressed in the given documents. Let me provide some relevant information and suggestions: 1. Authentication: Your code seems to be using a Personal Access Token (PAT) for authentication, which is correct. However, make sure your PAT has the necessary permissions to access the repository you're trying to connect to. As mentioned in the [GitHub Source Connector Documentation](https://docs.airbyte.com/integrations/sources/github#prerequisites), you need to ensure you have the correct permissions and scopes for your PAT. 2. Repository format: The format you're using for the repository (
"repositories": ["TalaatHasanin/mage-ai"]
) appears to be correct. It should be in the format
organization/repository
. 3. Error handling: The error you're seeing (
FileNotFoundError: [Errno 2] No such file or directory: ''
) suggests that the connector is trying to access a file that doesn't exist. This could be related to how the connector is installed or configured in your local environment. 4. Installation: You're using
install_if_missing=True
, which should automatically install the connector if it's not present. However, there might be an issue with the installation process. To troubleshoot this issue, you could try the following: 1. Ensure that you have the latest version of the Airbyte Python SDK installed. 2. Try manually installing the GitHub source connector before running your code:
Copy code
pip install airbyte-source-github
3. Check if there are any specific environment variables or configuration files that need to be set up for your local environment. If the issue persists, it might be helpful to check the [Airbyte GitHub repository](https://github.com/airbytehq/airbyte/issues) for similar issues or to raise a new issue with the detailed error message and your configuration (make sure to remove any sensitive information like your PAT before posting). Unfortunately, the provided knowledge sources don't contain enough information to pinpoint the exact cause of your specific error. If you continue to face issues, you might want to reach out to the Airbyte community through their [Slack channel or GitHub discussions](https://docs.airbyte.com/deploying-airbyte/troubleshoot-deploy#additional-resources) for more personalized assistance.