Skip to content

Unable to run chatterbot which depends on spaCy in heroku  #6682

@ShasV05

Description

@ShasV05

I went through all the previous issues and none of them solved
the output is as follows

2021-01-06T12:28:21.298436+00:00 app[worker.1]:     english_bot = ChatBot("Chatterbot", storage_adapter="chatterbot.storage.SQLStorageAdapter")
2021-01-06T12:28:21.298478+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/chatterbot.py", line 28, in __init__
2021-01-06T12:28:21.298690+00:00 app[worker.1]:     self.storage = utils.initialize_class(storage_adapter, **kwargs)
2021-01-06T12:28:21.298728+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/utils.py", line 33, in initialize_class
2021-01-06T12:28:21.298917+00:00 app[worker.1]:     return Class(*args, **kwargs)
2021-01-06T12:28:21.298956+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/storage/sql_storage.py", line 20, in __init__
2021-01-06T12:28:21.299146+00:00 app[worker.1]:     super().__init__(**kwargs)
2021-01-06T12:28:21.299191+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/storage/storage_adapter.py", line 21, in __init__
2021-01-06T12:28:21.299381+00:00 app[worker.1]:     'tagger_language', languages.ENG
2021-01-06T12:28:21.299418+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/chatterbot/tagging.py", line 13, in __init__
2021-01-06T12:28:21.299602+00:00 app[worker.1]:     self.nlp = spacy.load(self.language.ISO_639_1.lower())
2021-01-06T12:28:21.299644+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/spacy/__init__.py", line 21, in load
2021-01-06T12:28:21.300077+00:00 app[worker.1]:     return util.load_model(name, **overrides)
2021-01-06T12:28:21.300123+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/spacy/util.py", line 119, in load_model
2021-01-06T12:28:21.300486+00:00 app[worker.1]:     raise IOError(Errors.E050.format(name=name))
2021-01-06T12:28:21.300532+00:00 app[worker.1]: OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
2021-01-06T12:28:21.779857+00:00 heroku[worker.1]: State changed from up to crashed

I used many solutions but none of them solved
this is how my requirements.txt looks like

discord.py==1.5.1
ChatterBot==1.0.8
chatterbot-corpus==1.2.0
spacy>=2.0.16,<2.1.0
https://github.com/explosion/spacy-models/releases/download/en_core_web_md-2.0.0/en_core_web_md-2.0.0.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    installInstallation issueslang / enEnglish language data and modelsresolvedThe issue was addressed / answered

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions