MaartenGr / MaartenGr/BERTopic
SystemError: initialization of _internal failed without raising an exception
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
The following error occurs simply importing bertopic.
```
from bertopic import BERTopic
---------------------------------------------------------------------------
SystemError Traceback (most recent call last)
/tmp/ipykernel_105749/22541067.py in
7 tqdm.pandas(desc="Processing Rows")
8
----> 9 from bertopic import BERTopic
10 from umap import UMAP
~/.local/lib/python3.10/site-packages/bertopic/__init__.py in
----> 1 from bertopic._bertopic import BERTopic
2
3 __version__ = "0.13.0"
4
5 __all__ = [
~/.local/lib/python3.10/site-packages/bertopic/_bertopic.py in
24 # Models
25 import hdbscan
---> 26 from umap import UMAP
27 from sklearn.preprocessing import normalize
28 from sklearn import __version__ as sklearn_version
~/.local/lib/python3.10/site-packages/umap/__init__.py in
1 from warnings import warn, catch_warnings, simplefilter
----> 2 from .umap_ import UMAP
3
4 try:
5 with catch_warnings():
~/.local/lib/python3.10/site-packages/umap/umap_.py in
26 from scipy.sparse import tril as sparse_tril, triu as sparse_triu
27 import scipy.sparse.csgraph
---> 28 import numba
29
30 import umap.distances as dist
~/.local/lib/python3.10/site-packages/numba/__init__.py in
40
41 # Re-export vectorize decorators and the thread layer querying function
---> 42 from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
43 get_num_threads, set_num_threads,
44 set_parallel_chunksize, get_parallel_chunksize,
~/.local/lib/python3.10/site-packages/numba/np/ufunc/__init__.py in
1 # -*- coding: utf-8 -*-
2
----> 3 from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
4 from numba.np.ufunc._internal import PyUFunc_None, PyUFunc_Zero, PyUFunc_One
5 from numba.np.ufunc import _internal, array_exprs
~/.local/lib/python3.10/site-packages/numba/np/ufunc/decorators.py in
1 import inspect
2
----> 3 from numba.np.ufunc import _internal
4 from numba.np.ufunc.parallel import ParallelUFuncBuilder, ParallelGUFuncBuilder
5
SystemError: initialization of _internal failed without raising an exceptio
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the import path in bertopic/_bertopic.py and the failing numba.np.ufunc._internal import shown in the traceback. Reproduce `from bertopic import BERTopic` in the reported Python 3.10 environment, then inspect the project's dependency and version constraints. Done means the import succeeds with a confirmed compatible dependency combination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100