Module Not Found Error : NLTK module

Hello, I created my first streamlit app and it works fine locally, but i was wondering why it’s not working online at this link : https://esilvnlp-fgb73fuqgaq9wapawriq8l.streamlit.app/Tokenizers)

Here is my github repo since it’s linked : GitHub - minji-km/esilv_nlp

I get this error :

ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).

Traceback:

File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in _run_script
    exec(code, module.__dict__)File "/mount/src/esilv_nlp/pages/01_Tokenizers.py", line 2, in <module>
    import nltk

my requirements.txt :
streamlit
pandas
numpy
nltk

Hi @minji-km :wave:

Try using a specific version, e.g. nltk==3.6.2, and then reboot your app. Sometimes that can resolve these types of issues.

If not, let me know and we can investigate further! :slight_smile:

Best,
Charly

It worked ! Thank you very much

Glad it worked for you! :hugs:

Best,
Charly

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.