From 1f501af602c1274468ce16e800e40dfa3737389c Mon Sep 17 00:00:00 2001 From: ines Date: Fri, 7 Apr 2017 16:21:32 +0200 Subject: [PATCH] Add file name shadowing module issue to troubleshooting guide (see #953) --- website/docs/usage/troubleshooting.jade | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/website/docs/usage/troubleshooting.jade b/website/docs/usage/troubleshooting.jade index cb8271343..501a250c8 100644 --- a/website/docs/usage/troubleshooting.jade +++ b/website/docs/usage/troubleshooting.jade @@ -137,6 +137,20 @@ p | #[code python -m spacy download en]. For more info on this, see the | #[+a("/docs/usage/cli") CLI documentation]. ++h(3, "module-load") 'module' object has no attribute 'load' + ++code(false, "text"). + AttributeError: 'module' object has no attribute 'load' + +p + | While this could technically have many causes, including spaCy being + | broken, the most likely one is that your script's file or directory name + | is "shadowing" the module – e.g. your file is called #[code spacy.py], + | or a directory you're importing from is called #[code spacy]. + ++infobox("Solution") + | When using spaCy, never call anything else #[code spacy]. + +h(2, "usage") Using spaCy +h(3, "pos-lemma-number") POS tag or lemma is returned as number