timvink / mkdocs-table-reader-plugin

MkDocs plugin that enables a markdown tag like {{ read_csv('table.csv') }} to directly insert various table formats into a page
https://timvink.github.io/mkdocs-table-reader-plugin/
MIT License
111 stars 18 forks source link

Plugin appears to install but fails when attempting to enable from mkdocs.yml #37

Closed dcaddick closed 1 year ago

dcaddick commented 1 year ago

I'm seeing this in the Logs for GitHub Actions (not a local install)

From the MakeDocsAction.yaml in .github\workflows...

Allows you to run this workflow manually from the Actions tab workflow_dispatch:
jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Install plugins
        run: | 
          python -m pip install --upgrade pip setuptools wheel
          pip install mkdocs-minify-plugin==0.3.0
          pip3 install mkdocs-table-reader-plugin
          python -m mkdocs --version  #Added for Troubleshooting
          python pip3 --version  #Added for Troubleshooting
      - name: Build docs
        uses: athackst/mkdocs-simple-plugin@v2.1.3
        with:
        #   # (optional) Specify branch 
        #   publish_branch: main # gh-pages

Log of action appears to indicate error? https://github.com/dcaddick/gsd_public/actions/runs/3835500360

Collecting mkdocs-table-reader-plugin
  Downloading mkdocs_table_reader_plugin-1.2-py3-none-any.whl (7.1 kB)
Requirement already satisfied: PyYAML>=5.4.1 in /usr/lib/python3/dist-packages (from mkdocs-table-reader-plugin) (5.4.1)
Collecting tabulate>=0.8.7
  Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
Requirement already satisfied: mkdocs>=1.0 in /home/runner/.local/lib/python3.10/site-packages (from mkdocs-table-reader-plugin) (1.4.2)
Collecting pandas>=1.1
  Downloading pandas-1.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.1/12.1 MB 48.4 MB/s eta 0:00:00
Requirement already satisfied: ghp-import>=1.0 in /home/runner/.local/lib/python3.10/site-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (2.1.0)
Requirement already satisfied: jinja2>=2.11.1 in /usr/lib/python3/dist-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (3.0.3)
Requirement already satisfied: packaging>=20.5 in /usr/local/lib/python3.10/dist-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (22.0)
Requirement already satisfied: watchdog>=2.0 in /home/runner/.local/lib/python3.10/site-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (2.2.1)
Requirement already satisfied: mergedeep>=1.3.4 in /home/runner/.local/lib/python3.10/site-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (1.3.4)
Requirement already satisfied: pyyaml-env-tag>=0.1 in /home/runner/.local/lib/python3.10/site-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (0.1)
Requirement already satisfied: click>=7.0 in /usr/lib/python3/dist-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (8.0.3)
Requirement already satisfied: markdown<3.4,>=3.2.1 in /home/runner/.local/lib/python3.10/site-packages (from mkdocs>=1.0->mkdocs-table-reader-plugin) (3.3.7)
Requirement already satisfied: python-dateutil>=2.8.1 in /home/runner/.local/lib/python3.10/site-packages (from pandas>=1.1->mkdocs-table-reader-plugin) (2.8.2)
Collecting numpy>=1.21.0
  Downloading numpy-1.24.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 91.0 MB/s eta 0:00:00
Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas>=1.1->mkdocs-table-reader-plugin) (2022.1)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.1->pandas>=1.1->mkdocs-table-reader-plugin) (1.16.0)
Installing collected packages: tabulate, numpy, pandas, mkdocs-table-reader-plugin
Successfully installed mkdocs-table-reader-plugin-1.2 numpy-1.24.1 pandas-1.5.2 tabulate-0.9.0
python -m mkdocs, version 1.4.2 from /home/runner/.local/lib/python3.10/site-packages/mkdocs (Python 3.10)
python: can't open file '/home/runner/work/gsd_public/gsd_public/pip3': [Errno 2] No such file or directory
Error: Process completed with exit code 2.

If I remove the two lines indicated as Troubleshooting the system will run quite happily. This appears to indicate that the "mkdocs-table-reader-plugin" has installed correctly. The log also supports this

However - when I try and enable the installed plugin via mkdocs.yml file in the root - it fails again:

plugins:
    - search
    - simple
    #- social
    #- awesome-list
    #- table-reader

Not that I'm any sort of expert, but I'm guessing that the two paths indicated seems to be in conflict somewhat?

timvink commented 1 year ago

Thanks for reporting.

Can you try with pip instead of pip3?

timvink commented 1 year ago

There's also a V3 available..

uses: actions/checkout@v2

dcaddick commented 1 year ago

I can try on pip instead of pip3, but the plug-in loads without error at this stage. It’s only when I try and enable it that it fails…

On Wed, 4 Jan 2023 at 3:37 pm, Tim Vink @.***> wrote:

There's also a V3 available..

uses: @.***

— Reply to this email directly, view it on GitHub https://github.com/timvink/mkdocs-table-reader-plugin/issues/37#issuecomment-1370574529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV3BB42Z2DHDDUUOFTXYU3WQUSFFANCNFSM6AAAAAATQNFLUI . You are receiving this because you authored the thread.Message ID: @.***>

-- Regards, Dave Caddick

dcaddick commented 1 year ago

Result is, only when enabled & the process reruns I get this:

Deploying docs to gh-pages 106 https://github.com/dcaddick/gsd_public/actions/runs/3837529011/jobs/6532933644#step:5:107ERROR

Note, this is actually when deploying to gh-pages? Action/run is here https://github.com/dcaddick/gsd_public/actions/runs/3837529011

On Wed, 4 Jan 2023 at 5:58 pm, David Caddick @.***> wrote:

I can try on pip instead of pip3, but the plug-in loads without error at this stage. It’s only when I try and enable it that it fails…

On Wed, 4 Jan 2023 at 3:37 pm, Tim Vink @.***> wrote:

There's also a V3 available..

uses: @.***

— Reply to this email directly, view it on GitHub https://github.com/timvink/mkdocs-table-reader-plugin/issues/37#issuecomment-1370574529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV3BB42Z2DHDDUUOFTXYU3WQUSFFANCNFSM6AAAAAATQNFLUI . You are receiving this because you authored the thread.Message ID: @.***>

-- Regards, Dave Caddick

-- Regards, Dave Caddick

timvink commented 1 year ago

Hi Dave,

Late follow-up, things have been busy here and OS is low-prio / hobby for me :)

The issue is not with table-reader, but with your setup of github actions.

Some things I noticed.

1) you're using different commands to install plugins. Better to pick one.

pip install mkdocs-minify-plugin==0.3.0
pip3 install mkdocs-table-reader-plugin

2) You haven't specified the python version you want to use.

3) You're using the mkdocs-simple-plugin , but an outdated version. I checked their docs for you, but they don't give a good example of how to install the plugins.

      - name: Build docs
        uses: athackst/mkdocs-simple-plugin@v2.1.3

I would open an issue on that repo with a request for clearer docs tbh.

dcaddick commented 1 year ago

Thanks Tim,

Also a hobby for me, but slowly working thru it - thanks for your suggestions

On Mon, 16 Jan 2023 at 8:41 pm, Tim Vink @.***> wrote:

Hi Dave,

Last follow-up, things have been busy here and OS is low-prio / hobby for me :)

The issue is not with table-reader, but with your setup of github actions.

Two things I noticed.

  1. you're using different commands to install plugins. Better to pick one.

pip install mkdocs-minify-plugin==0.3.0 pip3 install mkdocs-table-reader-plugin

1.

You haven't specified the python version you want to use. 2.

You're using the mkdocs-simple-plugin , but an outdated version. I checked their docs for you, but they don't give a good example of how to install the plugins.

  - name: Build docs
    uses: ***@***.***

I would open an issue on that repo with a request for clearer docs tbh.

— Reply to this email directly, view it on GitHub https://github.com/timvink/mkdocs-table-reader-plugin/issues/37#issuecomment-1384000684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEV3BB3Y5RT6FTAWO76XI2DWSU6XVANCNFSM6AAAAAATQNFLUI . You are receiving this because you authored the thread.Message ID: @.***>

-- Regards, Dave Caddick