AnswerDotAI / AnswerDotAI/nbdev

fastcore.dispatch dependence issue

Open
#1,517 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Jupyter Notebook
Stars
5.3k
Forks
513
Avg merge
2d 30m
Merged PRs (30d)
8

Description

# Provide a minimally reproducible example

Environment File:

```yml
name: scuppernong

channels:
- conda-forge
- fastai
- - defaults

dependencies:
- python>=3.12

# nbdev
# --------------------------------------------------------------------------------
- fastai::nbdev>=2.3.12
- plum-dispatch
```

Then create a new project with `nbdev new` and then run

```python
#| hide
from nbdev.showdoc import *
```

to get:

```
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[7], line 2
1 #| hide
----> 2 from nbdev.showdoc import *

File ~/mamba/envs/scuppernong/lib/python3.12/site-packages/nbdev/__init__.py:4
1 __version__ = "2.3.34"
3 from .doclinks import nbdev_export
----> 4 from .showdoc import show_doc

File ~/mamba/envs/scuppernong/lib/python3.12/site-packages/nbdev/showdoc.py:10
7 from .doclinks import *
8 from .config import get_config
---> 10 from fastcore.dispatch import TypeDispatch
11 from fastcore.docments import *
12 from fastcore.utils import *

File ~/mamba/envs/scuppernong/lib/python3.12/site-packages/fastcore/dispatch.py:2, in __getattr__(name)
1 def __getattr__(name):
----> 2 raise ImportError(
3 f"Could not import '{name}' from fastcore.dispatch - this module has been moved to the fasttransform package.\n"
4 "To migrate your code, please see the migration guide at: https://answerdotai.github.io/fasttransform/fastcore_migration_guide.html"
5 )

ImportError: Could not import '__path__' from fastcore.dispatch - this module has been moved to the fasttransform package.
To migrate your code, please see the migration guide at: https://answerdotai.github.io/fasttransform/fastcore_migration_guide.html
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.