Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

Failing to train on a python 3.7 code env

Solved!
NicolasD
Dataiker
Dataiker
Failing to train on a python 3.7 code env

As of 18 feb 2022, newly createdpython 3.7+ code envs may fail to train models with the following error message :

Failed to train : <class 'ImportError'> : cannot import name 'soft_unicode' from 'markupsafe' (/home/ubuntu/dss-home/code-envs/python/visualml/lib/python3.7/site-packages/markupsafe/__init__.py)

This is due to Markupsafe releasing a new version incompatible with other libs in the code env.

To avoid/fix the problem, one has to manually pin Markupsafe to the 2.0.1 version. 

 

This is done by adding 

MarkupSafe>=2.0.1,<2.1.0

to the list of requested packages in the code env, and rebuilding it. 


Operating system used: Ubuntu 18.04

1 Solution
NicolasD
Dataiker
Dataiker
Author

I hope this helps anyone who would encounter this.
Please rest assured that it will be fixed in a future release of Dataiku!

View solution in original post

1 Reply
NicolasD
Dataiker
Dataiker
Author

I hope this helps anyone who would encounter this.
Please rest assured that it will be fixed in a future release of Dataiku!