Problem with reading wordnet even though I have included nltk.download('wordnet') in my code

My app was working fine some days before but now it is unable to read wordnet from the same code. Showing this lookup error

LookupError:


Resource ‘corpora/wordnet.zip/wordnet/.zip/’ not found. Please

use the NLTK Downloader to obtain the resource: >>>

nltk.download()

Searched in:

- '/home/appuser/nltk_data'

- '/usr/share/nltk_data'

- '/usr/local/share/nltk_data'

- '/usr/lib/nltk_data'

- '/usr/local/lib/nltk_data'

Hi @solatjabeen,

Are you running this app locally or on Streamlit Cloud? If on Streamlit Cloud, it looks like you might have a local path in your code, which won’t work when your app is deployed since the app will no longer have access to your local machine.

Caroline

Hello @Caroline,

The app is running on streamlit cloud and I do not have any local paths in my app. The same code was executing perfectly on streamlit cloud some days ago but now it is raising issues.

Thanks,
Solat

@solatjabeen Can you share the GitHub repo?

Hi Solat,

Did you ever resolve this? I came back to an app I had running a year or so ago and started to see the same error pop up, despite no code changes.

Thanks,
Ethan

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