bonobo icon indicating copy to clipboard operation
bonobo copied to clipboard

Bug: Could not load 'init': cannot import name 'soft_unicode' from 'markupsafe'

Open getorca opened this issue 2 years ago • 2 comments

when running bonobo init tutorial.py I get the following error:

ERR.:0000:stevedore.extension: Could not load 'init': cannot import name 'soft_unicode' from 'markupsafe' ([...]/venv/lib/python3.8/site-packages/markupsafe/__init__.py)
usage: bonobo [-h] [--debug]
              {convert,download,examples,inspect,run,version} ...
bonobo: error: argument command: invalid choice: 'init' (choose from 'convert', 'download', 'examples', 'inspect', 'run', 'version')

Related to MarkupSafe==2.1.1. Downgrading to pip install MarkupSafe==2.0.1 works as expected.

Versions

  • Bonobo version: bonobo v.0.6.4

  • Python version: Python 3.8.10

  • Platform: Ubuntu 20.04.4 LTS

I'm very new to bonobo so I haven't dug in yet to see if this should be fixed with a pull request and patch on the code base, or specifying a maximum version in requirements?

getorca avatar Apr 01 '22 18:04 getorca

I ran into exactly the same issue and did a little bit of digging around

  • First of all it seems soft_unicode was dropped in the MarkupSafe 2.1.1 release
  • Second I'm not sure why this impacts the project as it appears the MarkupSafe version is pinned in requirements.txt but my python fu and understanding of python packaging/dependency resolution is far from great!
  • Third I found some issues regarding the soft_unicode issue in markup soft project it's self see https://github.com/pallets/markupsafe/issues/288 but wasn't able to make much sense of it
  • Four it looks like the source of the issue may stem from Jinga2 - https://github.com/pallets/jinja/issues/1658 & therefor bumping the version pinned in this projects requirements.txt may fix it?

This is about as far as i've gotten so far but hopefully it's enough to keep this moving!

Versions

  • Python 3.9.2
  • Bono v.0.6.4

yuhonas avatar Apr 30 '22 21:04 yuhonas

I am also getting the same error. Any assistance or path forward would be greatly appreciated. I also posted about it on SO.

Alquh avatar Jun 16 '22 18:06 Alquh