octimot/StoryToolkitAI

Update problem - ImportError: cannot import name 'get_end' from 'whisper.utils'

Closed this issue · 6 comments

updating to the newest version, i get the following error message after starting the toolkit:

(venv) D:\temp\StoryToolkitAI>py StoryToolkitAI\storytoolkitai
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "D:\temp\StoryToolkitAI\StoryToolkitAI\storytoolkitai_main
.py", line 123, in
from storytoolkitai.core.toolkit_ops.toolkit_ops import ToolkitOps
File "D:\temp\StoryToolkitAI\StoryToolkitAI\storytoolkitai..\storytoolkitai\core\toolkit_ops\toolkit_ops.py", line 10, in
import storytoolkitai.integrations.mots_whisper as whisper
File "D:\temp\StoryToolkitAI\StoryToolkitAI\storytoolkitai..\storytoolkitai\integrations\mots_whisper.py", line 28, in
from whisper.utils import (
ImportError: cannot import name 'get_end' from 'whisper.utils' (D:\temp\StoryToolkitAI\venv\lib\site-packages\whisper\utils.py)

Could you do a quick pip list in your virtual environment and copy the list here?

The error should be solvable if you do this:

pip uninstall openai-whisper
pip install -r StoryToolkitAI/requirements.txt
py StoryToolkitAI\storytoolkitai

(venv) D:\temp\StoryToolkitAI>pip list
Package Version


aiohttp 3.8.4
aiosignal 1.3.1
alembic 1.13.1
antlr4-python3-runtime 4.9.3
anyio 4.2.0
appdirs 1.4.4
asteroid-filterbanks 0.4.0
async-timeout 4.0.2
attrs 23.1.0
audioread 3.0.0
blis 0.7.9
catalogue 2.0.8
certifi 2023.7.22
cffi 1.15.1
charset-normalizer 2.1.1
click 8.1.3
clip 1.0
colorama 0.4.6
coloredlogs 15.0.1
colorlog 6.8.0
commonmark 0.9.1
confection 0.0.4
contourpy 1.2.0
customtkinter 5.1.3
cycler 0.12.1
cymem 2.0.7
darkdetect 0.8.0
decorator 4.4.2
distro 1.9.0
docopt 0.6.2
dtw-python 1.3.0
einops 0.7.0
exceptiongroup 1.1.1
ffmpeg-python 0.2.0
filelock 3.8.0
flatbuffers 23.5.26
fonttools 4.47.2
frozenlist 1.3.3
fsspec 2023.6.0
ftfy 6.1.1
future 0.18.3
greenlet 3.0.3
h11 0.14.0
httpcore 1.0.2
httpx 0.26.0
huggingface-hub 0.20.2
humanfriendly 10.0
HyperPyYAML 1.2.2
idna 3.4
imageio 2.31.1
imageio-ffmpeg 0.4.8
iniconfig 2.0.0
Jinja2 3.1.2
joblib 1.2.0
julius 0.2.7
kiwisolver 1.4.5
langcodes 3.3.0
langdetect 1.0.7
lazy_loader 0.2
librosa 0.10.0.post2
lightning 2.1.3
lightning-utilities 0.10.0
llvmlite 0.40.1rc1
Mako 1.3.0
MarkupSafe 2.1.3
matplotlib 3.8.2
more-itertools 9.1.0
moviepy 1.0.3
mpmath 1.3.0
msgpack 1.0.5
multidict 6.0.4
murmurhash 1.0.9
networkx 3.1
nltk 3.8.1
numba 0.57.0
numpy 1.24.3
omegaconf 2.3.0
onnxruntime 1.15.0
openai 1.8.0
openai-whisper 20231117
opencv-python 4.7.0.72
optuna 3.5.0
packaging 21.3
pandas 2.1.4
patchify 0.2.3
pathy 0.10.1
Pillow 9.5.0
pip 23.1.2
pluggy 1.0.0
pooch 1.6.0
preshed 3.0.8
primePy 1.3
proglog 0.1.10
protobuf 4.23.2
pyannote.audio 3.1.1
pyannote.core 5.0.0
pyannote.database 5.0.1
pyannote.metrics 3.2.1
pyannote.pipeline 3.0.1
pycparser 2.21
pydantic 1.10.8
Pygments 2.17.2
pyparsing 3.0.9
pyreadline3 3.4.1
pytest 7.3.2
python-dateutil 2.8.2
pytorch-lightning 2.1.3
pytorch-metric-learning 2.4.1
pytz 2023.3.post1
PyWavelets 1.4.1
PyYAML 6.0
regex 2022.9.13
requests 2.31.0
resampy 0.4.2
rich 12.6.0
ruamel.yaml 0.18.5
ruamel.yaml.clib 0.2.8
safetensors 0.3.1
scikit-image 0.21.0
scikit-learn 1.2.2
scipy 1.10.1
semver 3.0.2
sentence-transformers 2.2.2
sentencepiece 0.1.99
setuptools 67.7.2
shellingham 1.5.4
six 1.16.0
smart-open 6.3.0
sniffio 1.3.0
sortedcontainers 2.4.0
soundfile 0.12.1
soxr 0.3.5
spacy 3.5.3
spacy-langdetect 0.1.2
spacy-legacy 3.0.12
spacy-loggers 1.0.4
speechbrain 0.5.16
SQLAlchemy 2.0.25
srsly 2.4.6
sympy 1.12
tabulate 0.9.0
tensorboardX 2.6.2.2
thinc 8.1.10
threadpoolctl 3.1.0
tifffile 2023.8.12
tiktoken 0.3.3
timecode 1.3.1
tokenizers 0.15.0
tomli 2.0.1
torch 2.0.1
torch-audiomentations 0.11.0
torch-pitch-shift 1.2.4
torchaudio 2.0.2
torchmetrics 1.3.0.post0
torchvision 0.15.2
tqdm 4.65.0
transformers 4.36.2
typer 0.7.0
typing_extensions 4.7.0
tzdata 2023.4
urllib3 1.26.12
wasabi 1.1.2
wcwidth 0.2.6
wheel 0.40.0
yarl 1.9.2

[notice] A new release of pip is available: 23.1.2 -> 23.3.2
[notice] To update, run: python.exe -m pip install --upgrade pip

This looks as it should be...

Did the fix work?

it did! thanks very much!!

Cool!

I pushed a patch to make the package update more focused in the code 90b5c6a

Also, I'm leaving this issue open for now in case someone else hits the same problem.

Cheers!

Great, thanks again!