Error while creating new-site

raise ImportError(‘Module import failed for {0} ({1})’.format(doctype, module_name + ’ Error: ’ + str(e)))
ImportError: Module import failed for Web Page (frappe.website.doctype.web_page.web_page Error: cannot import name ‘soft_unicode’ from ‘markupsafe’ (/home/erpuser/frappe-bench/env/lib/python3.8/site-packages/markupsafe/init.py))

2 Likes

Hi

I am having the same issue when I am installing ERPNext 13 on Ubuntu 20.04

I am using this procedure.

Can anyone please assist ? I would lik eto move my V12 server over to V13.

Revisiting this myself this weekend. Although probably not on a equal footing as yourself. I will be trying to install v13.11 from a frozen repository. If I make any progress It will be posted in one of my tutorials.

The landscape is constantly changing due to the multitude of different packages that ERPNext relies upon to get up and running. Changes in any one of them can blow up the process.

BKM

Thank you so much @bkm

My aim for this weekend was actually to first install V13 and then look at multi-tenancy.
I have done all my reading up ( if I am not mistaken some of those posts include posts from
you !! ) and I am ready to tackle the multi-tenancy !!

Having done a V13 install a few months ago, I was sure I could quickly get to the
multi-tenancy … but … oh dear …

And I suspect you have hit the nail on the head of why an install that previously worked
is now failing…

I shall look out for a post from you, with the full understanding that everyone, including you
are very busy.

I have found a manual “long” method of install which all went well until…
bench new-site.
Long story short … I did not configure /etc/mysql/my.conf
But other than that , it went pretty cool.

I am going to redo and if it works I shall post incase someone else can benefit.

Update …

Tried another install … manual, and its long …

Same error as above …

I have now through the day did about 5 or 6 installs of V13, all of them on Ubuntu 20.04 LTS.
and they all fail with the same error as the first post from @Habibur_Rahman.

Some of the installs are script installs and some are manual.

So, just for complete sake …
Digital Ocean droplet 2VCPU, 4G RAM; Ubuntu 20.04 LTS

Edit: error happened at …
bench new-site …

Update …

@Habibur_Rahman, I haven’t tried this yet … I shall try this tomorrow …

But if you want to look at this . I did a bit of googling and searching and found this…

Others seem to have success with it …

Edit with update …

I have tried the solution as suggested by @padraig.fogarty as mentioned in the post just above and it works. Thank you @padraig.fogarty.

So in summary what I did …

I used the manual instalation method as listed here …

I continued until just before …
bench setup requirements

I then edited the file as suggested in the post above and then
continued with …

bench setup requirements
and the rest of the steps

Currently logged in to my V13 server and doing all the system setups.

I have solved this problem by downgrading to the python library, removing it using virtualenv pip uninstall MarkupSafe and then installing version 2.0.1 pip install markupsafe==2.0.1

This is because in version 2.1.0 , they removed the soft_unicode.

For more information : MarkupSafe Issue

2 Likes

I had to sudo pip install markupsafe==2.0.1

3 Likes

Thanks @adam26d and @waflecl , It worked for me. I was struggling since last 2-3 days to resolve the only one error that "ImportError: cannot import name ‘soft_unicode’ from ‘markupsafe’ ". I donwgraded it using sudo pip3 install markupsafe==2.0.11 but it was not working but your solution sudo pip install markupsafe==2.0.1 worked like a charm!

1 Like