From bd35bf7f09013f57bd42e0f438285a401f461951 Mon Sep 17 00:00:00 2001 From: Alex Villarreal Date: Mon, 9 Jul 2018 11:31:37 -0500 Subject: [PATCH] Guidance to handle binary files in git in Windows (#2526) Adds guidance on what to do if users encounter the error described in [1634](https://github.com/explosion/spaCy/issues/1634), which probably only happens in Windows environments. --- website/usage/_install/_troubleshooting.jade | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/website/usage/_install/_troubleshooting.jade b/website/usage/_install/_troubleshooting.jade index 5af81a632..f1092c076 100644 --- a/website/usage/_install/_troubleshooting.jade +++ b/website/usage/_install/_troubleshooting.jade @@ -177,3 +177,23 @@ p | your updates. You can also do this by running spaCy over some text, | extracting a bunch of entities the model previously recognised correctly, | and adding them to your training examples. + ++h(3, "unhashable-list") Unhashable type: 'list' + ++code(false, "text"). + TypeError: unhashable type: 'list' + +p + | If you're training models, writing them to disk, and versioning them with + | git, you might encounter this error when trying to load them in a Windows + | environment. This happens because a default install of Git for Windows is + | configured to automatically convert Unix-style end-of-line characters + | (LF) to Windows-style ones (CRLF) during file checkout (and the reverse + | when commiting). While that's mostly fine for text files, a trained model + | written to disk has some binary files that should not go through this + | conversion. When they do, you get the error above. You can fix it by + | either changing your #[+a("https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration", true) "core.autocrlf"] + | setting to "false", or by commiting a #[+a("https://git-scm.com/docs/gitattributes", true) ".gitattributes file"] + | to your repository to tell git on which files or folders it shouldn't do + | LF-to-CRLF conversion, with an entry like "path/to/your/trained/spacy/model/** -text". + | After you've done either of these, clone your repository again.