"git@developer.sourcefind.cn:OpenDAS/dcnv3.git" did not exist on "f7df4b3c162b6b0c4403c9c89af443ceb1ac48e4"
Commit c84fd443 authored by Vaclav Hanzl's avatar Vaclav Hanzl
Browse files

Fix notebook: Better mitigation of the ANSI_X3.4-1968 problem in Colab

Colab is easily broken by openmm and other software messing with locale.
This mitigation patch lets the %shell and ! work again.
It is much stronger solution than just avoiding shell when making zip.
parent 9c38e958
......@@ -249,6 +249,13 @@
"import torch\n",
"import shutil\n",
"\n",
"# Prevent shell magic being broken by openmm, prevent this cryptic error:\n",
"# \"NotImplementedError: A UTF-8 locale is required. Got ANSI_X3.4-1968\"\n",
"import locale\n",
"def getpreferredencoding(do_setlocale = True):\n",
" return \"UTF-8\"\n",
"locale.getpreferredencoding = getpreferredencoding\n",
"\n",
"# A filthy hack to avoid slow Linear layer initialization\n",
"import openfold.model.primitives\n",
"\n",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment