hi there, I'm getting this error when I try to imp...
# community-support
a
hi there, I'm getting this error when I try to implement the gh action
run-elementary-action
. Until yesterday I was testing the deployment of the elementary report in a pr and it was working normally. Suddenly this error started appearing, I tried debugging in several ways but I couldn't find a solution. Do you have any idea what it could be?
Copy code
2024-03-28 01:51:44,757 Failed to get Elementary dbt package version: ***'returncode': 2, 'cmd': ['dbt', '--log-format', 'json', 'run-operation', 'get_elementary_dbt_pkg_version', '--project-dir', '/edr_stager_dbt_project'], 'output': b'***"data": ***"log_version": 3, "version": "=1.5.10"***, "info": ***"category": "", "code": "A001", "extra": ***, "invocation_id": "42588275-5fc0-4efb-9db5-ba3bc7864dc6", "level": "info", "msg": "Running with dbt=1.5.10", "name": "MainReportVersion", "pid": 62, "thread": "MainThread", "ts": "2024-03-28T01:51:44.229484Z"***\n***"data": ***"exc": "pyarrow package not found. Install pyarrow version >= 3.0.0."***, "info": ***"category": "", "code": "Z002", "extra": ***, "invocation_id": "42588275-5fc0-4efb-9db5-ba3bc7864dc6", "level": "error", "msg": "Encountered an error:\\npyarrow package not found. Install pyarrow version >= 3.0.0.", "name": "MainEncounteredError", "pid": 62, "thread": "MainThread", "ts": "2024-03-28T01:51:44.353610Z"***\n***"data": ***"stack_trace": "Traceback (most recent call last):\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_versions_helpers.py\\", line 75, in try_import\\n    import pyarrow\\nModuleNotFoundError: No module named \'pyarrow\'\\n\\nThe above exception was the direct cause of the following exception:\\n\\nTraceback (most recent call last):\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/cli/requires.py\\", line 86, in wrapper\\n    result, success = func(*args, **kwargs)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/cli/requires.py\\", line 71, in wrapper\\n    return func(*args, **kwargs)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/cli/requires.py\\", line 139, in wrapper\\n    profile = load_profile(flags.PROJECT_DIR, flags.VARS, flags.PROFILE, flags.TARGET, threads)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/runtime.py\\", line 69, in load_profile\\n    profile = Profile.render(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 436, in render\\n    return cls.from_raw_profiles(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 401, in from_raw_profiles\\n    return cls.from_raw_profile_info(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 355, in from_raw_profile_info\\n    credentials: Credentials = cls._credentials_from_profile(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 165, in _credentials_from_profile\\n    cls = load_plugin(typename)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/factory.py\\", line 209, in load_plugin\\n    return FACTORY.load_plugin(name)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/factory.py\\", line 58, in load_plugin\\n    mod: Any = import_module(\\".\\" + name, \\"dbt.adapters\\")\\n  File \\"/usr/local/lib/python3.9/importlib/__init__.py\\", line 127, in import_module\\n    return _bootstrap._gcd_import(name[level:], package, level)\\n  File \\"<frozen importlib._bootstrap>\\", line 1030, in _gcd_import\\n  File \\"<frozen importlib._bootstrap>\\", line 1007, in _find_and_load\\n  File \\"<frozen importlib._bootstrap>\\", line 986, in _find_and_load_unlocked\\n  File \\"<frozen importlib._bootstrap>\\", line 680, in _load_unlocked\\n  File \\"<frozen importlib._bootstrap_external>\\", line 850, in exec_module\\n  File \\"<frozen importlib._bootstrap>\\", line 228, in _call_with_frames_removed\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/bigquery/__init__.py\\", line 1, in <module>\\n    from dbt.adapters.bigquery.connections import BigQueryConnectionManager  # noqa\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/bigquery/connections.py\\", line 14, in <module>\\n    import google.cloud.bigquery\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/__init__.py\\", line 35, in <module>\\n    from google.cloud.bigquery.client import Client\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/client.py\\", line 69, in <module>\\n    from google.cloud.bigquery import _job_helpers\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_job_helpers.py\\", line 47, in <module>\\n    from google.cloud.bigquery import job\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/job/__init__.py\\", line 27, in <module>\\n    from google.cloud.bigquery.job.copy_ import CopyJob\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/job/copy_.py\\", line 22, in <module>\\n    from google.cloud.bigquery.table import TableReference\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/table.py\\", line 62, in <module>\\n    from google.cloud.bigquery import _pandas_helpers\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_pandas_helpers.py\\", line 52, in <module>\\n    pyarrow = _versions_helpers.PYARROW_VERSIONS.try_import(raise_if_error=True)\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_versions_helpers.py\\", line 78, in try_import\\n    raise exceptions.LegacyPyarrowError(\\ngoogle.cloud.bigquery.exceptions.LegacyPyarrowError: pyarrow package not found. Install pyarrow version >= 3.0.0.\\n"***, "info": ***"category": "", "code": "Z003", "extra": ***, "invocation_id": "42588275-5fc0-4efb-9db5-ba3bc7864dc6", "level": "error", "msg": "Traceback (most recent call last):\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_versions_helpers.py\\", line 75, in try_import\\n    import pyarrow\\nModuleNotFoundError: No module named \'pyarrow\'\\n\\nThe above exception was the direct cause of the following exception:\\n\\nTraceback (most recent call last):\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/cli/requires.py\\", line 86, in wrapper\\n    result, success = func(*args, **kwargs)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/cli/requires.py\\", line 71, in wrapper\\n    return func(*args, **kwargs)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/cli/requires.py\\", line 139, in wrapper\\n    profile = load_profile(flags.PROJECT_DIR, flags.VARS, flags.PROFILE, flags.TARGET, threads)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/runtime.py\\", line 69, in load_profile\\n    profile = Profile.render(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 436, in render\\n    return cls.from_raw_profiles(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 401, in from_raw_profiles\\n    return cls.from_raw_profile_info(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 355, in from_raw_profile_info\\n    credentials: Credentials = cls._credentials_from_profile(\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/config/profile.py\\", line 165, in _credentials_from_profile\\n    cls = load_plugin(typename)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/factory.py\\", line 209, in load_plugin\\n    return FACTORY.load_plugin(name)\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/factory.py\\", line 58, in load_plugin\\n    mod: Any = import_module(\\".\\" + name, \\"dbt.adapters\\")\\n  File \\"/usr/local/lib/python3.9/importlib/__init__.py\\", line 127, in import_module\\n    return _bootstrap._gcd_import(name[level:], package, level)\\n  File \\"<frozen importlib._bootstrap>\\", line 1030, in _gcd_import\\n  File \\"<frozen importlib._bootstrap>\\", line 1007, in _find_and_load\\n  File \\"<frozen importlib._bootstrap>\\", line 986, in _find_and_load_unlocked\\n  File \\"<frozen importlib._bootstrap>\\", line 680, in _load_unlocked\\n  File \\"<frozen importlib._bootstrap_external>\\", line 850, in exec_module\\n  File \\"<frozen importlib._bootstrap>\\", line 228, in _call_with_frames_removed\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/bigquery/__init__.py\\", line 1, in <module>\\n    from dbt.adapters.bigquery.connections import BigQueryConnectionManager  # noqa\\n  File \\"/usr/local/lib/python3.9/site-packages/dbt/adapters/bigquery/connections.py\\", line 14, in <module>\\n    import google.cloud.bigquery\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/__init__.py\\", line 35, in <module>\\n    from google.cloud.bigquery.client import Client\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/client.py\\", line 69, in <module>\\n    from google.cloud.bigquery import _job_helpers\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_job_helpers.py\\", line 47, in <module>\\n    from google.cloud.bigquery import job\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/job/__init__.py\\", line 27, in <module>\\n    from google.cloud.bigquery.job.copy_ import CopyJob\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/job/copy_.py\\", line 22, in <module>\\n    from google.cloud.bigquery.table import TableReference\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/table.py\\", line 62, in <module>\\n    from google.cloud.bigquery import _pandas_helpers\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_pandas_helpers.py\\", line 52, in <module>\\n    pyarrow = _versions_helpers.PYARROW_VERSIONS.try_import(raise_if_error=True)\\n  File \\"/usr/local/lib/python3.9/site-packages/google/cloud/bigquery/_versions_helpers.py\\", line 78, in try_import\\n    raise exceptions.LegacyPyarrowError(\\ngoogle.cloud.bigquery.exceptions.LegacyPyarrowError: pyarrow package not found. Install pyarrow version >= 3.0.0.\\n", "name": "MainStackTrace", "pid": 62, "thread": "MainThread", "ts": "2024-03-28T01:51:44.356975Z"***\n', 'stderr': b''***
Traceback (most recent call last):
  File "/entrypoint.py", line 148, in <module>
    main()
  File "/entrypoint.py", line 139, in main
    install_edr(args.adapter, args.project_dir, args.profile_target)
  File "/entrypoint.py", line 62, in install_edr
    command_results = subprocess.run(
  File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dbt', '--log-format', 'json', 'run-operation', 'get_elementary_dbt_pkg_version', '--project-dir', '/edr_stager_dbt_project']' returned non-zero exit status 2.
the action I'm running:
Copy code
name: Deploy Elementary Report
on:
  # Run the action when a push to the main branch of the repository is made.
  pull_request:
    branches: [ "main", "master" ]
    
  workflow_dispatch:
jobs:
  elementary:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout dbt project
        uses: actions/checkout@v3
      - name: Run Elementary
        uses: elementary-data/run-elementary-action@v1.11
        with:
          warehouse-type: bigquery 
          adapter-version: 1.5.6 
          profiles-yml: ${{ secrets.ELEMENTARY_PROFILES_YML }} 
          edr-command:
            edr report
              --file-path "report.html"
            &&
            edr send-report
              --google-service-account-path "/tmp/gcs_keyfile.json"
              --gcs-bucket-name "${{ secrets.GCS_BUCKET_NAME }}"
              --update-bucket-website "true"

          bigquery-keyfile: ${{ secrets.BIGQUERY_KEYFILE }}
          gcs-keyfile: ${{ secrets.GCS_KEYFILE }} 

      - name: Upload report
        uses: actions/upload-artifact@v3
        with:
          name: report.html
          path: report.html

      - name: Upload log
        if: always()
        uses: actions/upload-artifact@v3
        with:
          name: edr.log
          path: edr.log
I even tried installing pyarrow before the action, but to no avail:
Copy code
- name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.9.17'             
      - name: Install PyArrow
        run: |
          python -m pip install --upgrade pip  &&
          python -m pip install pyarrow==3.0.0
b
Hi Arthur, I'm facing the same error. I'll keep an eye on this thread but I'd appreciate it if you could share your solution in case you can fix it, and the same goes for me.
a
I haven't managed to solve it yet. There is little/no information about it. I'll try to create an action that runs edr without using the docker image used in the
run-elementary-action
. Maybe it will work
I just saw that the
dbt-bigquery
received new releases to fix the problem, I'm going to test it.
Fixed!!!! In my case, I just updated the
dbt-bigquery
to
1.5.9
(because I'm using
dbt-core==1.5.6
) and changed the
adapter-version
input in the action to
1.5.9
as well. It worked.
🙌 1
✅ 1
b
wow, it worked like a charm, thank you so so much for sharing it! 🙂
🙌 2