fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.8k stars 484 forks source link

fastai/workflows/quarto-ghp@master failing and reporting "no module named 'pandas' #1403

Closed lidar532 closed 2 months ago

lidar532 commented 2 months ago

Working on my notebook at: https://github.com/lidar532/ww_MetaShapelib and it works perfect fine in JupyterLab, generates a usable module, and the nbdev_preview works just fine and locally displays the website just fine. When I push it to github, It fails the action "deploy" running fastai/workflows/quarto-ghp@master.

The relevant part of the "deploy" log is below:

Quarto is not installed. We will download and install it for you.
Installing or upgrading quarto -- this requires root access.
concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3550, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-bb79ee7e[239](https://github.com/lidar532/ww_MetaShapelib/actions/runs/8591511981/job/23540358572#step:2:251)1>", line 1, in <module>
    import pandas   as              pd
ModuleNotFoundError: No module named 'pandas'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/concurrent/futures/process.py", line [246](https://github.com/lidar532/ww_MetaShapelib/actions/runs/8591511981/job/23540358572#step:2:258), in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/concurrent/futures/process.py", line 205, in _process_chunk

I get no such error when running the notebook, or when using the nbdev-preview utility.

In addition to "deploy" completing with an "exit code 1", I'm getting also gettin the following warning:

deploy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
deven367 commented 2 months ago

Hi @lidar532, the pandas dependency is installed in your local virtual environment, but not in the runner running in GH actions.

You need to uncomment the line in settings.ini and add the dependencies of your package over there. https://github.com/lidar532/ww_MetaShapelib/blob/c14727b0eb28ffca60d94f69006c7365811ad0e1/settings.ini#L41