Find answers from the community

Updated 2 months ago

Hi everyone, I am running my app on a

Hi everyone, I am running my app on a server only partly connected to the internet, for data privacy reasons. The app works, but when I run it, I get this error message:

[nltk_data] Error loading punkt: <urlopen error [WinError 10054] An
[nltk_data] existing connection was forcibly closed by the remote
[nltk_data] host>

This error is thrown when the ServiceContext.from_defaults() function is executed. I think this is because my company is blocking some connections to some websites. But I have two questions:

  • is it normal behavior that nltk is reached at the moment of the execution of the script? Shouldn’t everything be installed when I do "pip install"?
  • any way to make this error disappear and have my script run fully locally, without calling any url at the moment of execution?
Thanks!
W
L
2 comments
Seems like nltk is not properly installed and few files need to be downloaded.

Try doing this once on your server
Plain Text
import nltk
nltk.download('punkt')
Yea this is normal for nltk -- you need to run the code above at some point
Add a reply
Sign up and join the conversation on Discord