From cc3aee1189f383499cd2a9f359336b3e2dff24cc Mon Sep 17 00:00:00 2001 From: Vetea Date: Thu, 8 Jun 2017 11:27:09 +0200 Subject: [PATCH] Add read() method when opening file Add read() method for to avoid : ```TypeError: Argument 'string' has incorrect type (expected str, got _io.TextIOWrapper)``` Test with: spaCy : v2.0.0 Alpha python : 3.5.2+ (default, Sep 22 2016, 12:18:14) --- website/docs/usage/lightning-tour.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/usage/lightning-tour.jade b/website/docs/usage/lightning-tour.jade index 89dac830c..14019b872 100644 --- a/website/docs/usage/lightning-tour.jade +++ b/website/docs/usage/lightning-tour.jade @@ -181,7 +181,7 @@ p from spacy.vocab import Vocab nlp = spacy.load('en') - moby_dick = open('moby_dick.txt', 'r') + moby_dick = open('moby_dick.txt', 'r').read() doc = nlp(moby_dick) doc.to_disk('/moby_dick.bin')