Thomasomasos
1 min readOct 13, 2019

--

Turns out with python 3 you have to open the file with mode=’rb’ to read as binary.

So it should look like

```with open(LDAvis_data_filepath, ‘wb’) as f:

pickle.dump(LDAvis_prepared, f)

# load the pre-prepared pyLDAvis data from disk

with open(LDAvis_data_filepath, ‘rb’) as f:

LDAvis_prepared = pickle.load(f)```

Sorry for the bad formatting, don’t know how this works …

--

--