ydata-profiling icon indicating copy to clipboard operation
ydata-profiling copied to clipboard

cannot import name 'soft_unicode' from 'markupsafe'

Open DaiZack opened this issue 2 years ago • 3 comments

Current Behaviour

Used colab with 3.2.0

!pip install pandas-profiling==3.2.0
import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport

df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])

it shows ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.7/dist-packages/markupsafe/init.py)

Expected Behaviour

no error

Data Description

None

Code that reproduces the bug

!pip install pandas-profiling==3.2.0
import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport

df = pd.DataFrame(np.random.rand(100, 5), columns=["a", "b", "c", "d", "e"])

pandas-profiling version

2.3.0

Dependencies

markupsafe==2.0.1

OS

Mac

Checklist

  • [X] There is not yet another bug report for this issue in the issue tracker
  • [X] The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
  • [X] The issue has not been resolved by the entries listed under Common Issues.

DaiZack avatar Jun 03 '22 16:06 DaiZack

There's discussion about this online - looks like a breaking change was introduced in markupsafe. Downgrading to markupsafe==2.0.1 seems to be the fix for now.

dvasdekis avatar Jun 22 '22 01:06 dvasdekis

@DaiZack can you please confirm if the behavior remains with the latest version pandasprofiling==3.3.0

fabclmnt avatar Sep 14 '22 17:09 fabclmnt

Yes, it works! Thank you. image

DaiZack avatar Sep 14 '22 17:09 DaiZack

Closing the issue! :)

fabclmnt avatar Sep 30 '22 18:09 fabclmnt