Geolib causing error on viktor-cli start

After upgrading my cli to the newest version, and reinstalling my app, I obtained the following error:

Traceback (most recent call last):
File “”, line 1, in
File “viktor_connector/connector.pyx”, line 1289, in connector.start
File “viktor_connector/connector.pyx”, line 1242, in connector.start.main_continuous
File “viktor_connector/connector.pyx”, line 97, in connector.import_geolib_modules
File “/usr/src/packages/geolib/init.py”, line 8, in
from .models import *
File “/usr/src/packages/geolib/models/init.py”, line 3, in
from .dfoundations import DFoundationsModel
File “/usr/src/packages/geolib/models/dfoundations/init.py”, line 1, in
from .dfoundations_model import DFoundationsModel
File “/usr/src/packages/geolib/models/dfoundations/dfoundations_model.py”, line 41, in
from .serializer import DFoundationsInputSerializer
File “/usr/src/packages/geolib/models/dfoundations/serializer.py”, line 3, in
from jinja2 import Environment, PackageLoader
File “/usr/src/packages/jinja2/init.py”, line 12, in
from .environment import Environment
File “/usr/src/packages/jinja2/environment.py”, line 25, in
from .defaults import BLOCK_END_STRING
File “/usr/src/packages/jinja2/defaults.py”, line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File “/usr/src/packages/jinja2/filters.py”, line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name ‘soft_unicode’ from ‘markupsafe’ (/usr/src/packages/markupsafe/init.py)

Connector version: 5.11.0

This is caused by an upgrade yesterday of the package markupsafe to version 2.1.0 and which is probably used within the Geolib library.
Solution: pining to a previous version in the requirements.txt file of your application folder.

markupsafe==2.0.1
1 Like

It might be valuable to create an issue in the geolib repository, such that they can address this:

1 Like

Changed title for better findability

1 Like

I just had a look to the requirements.txt of Geolib, it already pins to the correct version.

markupsafe==2.0.1

yes, but if you install d-geolib on a clean environment (outside VIKTOR)

markupsafe==2.0.1

is installed
image