ERPNext New Site unable to create

I have set up a PC as a server and i have also obtained a Static IP address from my Internet Provider and set it up as an ‘A’ record in the dns settings of my domain which i purchased.
However, ERP next is stuck on create new site and i get the below error no matter which site i try to install erpnext to.

Restoring Database file...
11.9KiB 0:00:00 [ 232MiB/s] [========================================================================>] 100%

Installing frappe...
Updating DocTypes for frappe        : [=================                       ] 43%Traceback (most recent call last):
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/modules/", line 205, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(module_name)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/", line 981, in get_module
    return importlib.import_module(modulename)
  File "/home/thittanix/frappe-bench/env/lib/python3.8/importlib/", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/website/doctype/web_page/", line 10, in <module>
    from jinja2.exceptions import TemplateSyntaxError
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/jinja2/", line 12, in <module>
    from .environment import Environment
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/jinja2/", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/jinja2/", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/jinja2/", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/markupsafe/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/", line 87, in _run_code
    exec(code, run_globals)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/utils/", line 104, in <module>
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/utils/", line 19, in main
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/click/", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/click/", line 782, in main
    rv = self.invoke(ctx)
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/click/", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/click/", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/commands/", line 38, in new_site
    _new_site(db_name, site, mariadb_root_username=mariadb_root_username,
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/", line 81, in _new_site
    install_app(app, verbose=verbose, set_as_patched=not source_sql)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/", line 162, in install_app
    sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/model/", line 70, in sync_for
    import_file_by_path(doc_path, force=force, ignore_version=True, reset_permissions=reset_permissions)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/modules/", line 130, in import_file_by_path
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/modules/", line 257, in import_doc
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/model/", line 270, in insert
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/model/", line 1004, in run_post_save_methods
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/model/", line 869, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/model/", line 1161, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/model/", line 1144, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/model/", line 863, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/core/doctype/doctype/", line 326, in on_update
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/core/doctype/doctype/", line 380, in run_module_method
    module = load_doctype_module(, self.module)
  File "/home/thittanix/frappe-bench/apps/frappe/frappe/modules/", line 207, in load_doctype_module
    raise ImportError('Module import failed for {0} ({1})'.format(doctype, module_name + ' Error: ' + str(e)))
ImportError: Module import failed for Web Page ( Error: cannot import name 'soft_unicode' from 'markupsafe' (/home/thittanix/frappe-bench/env/lib/python3.8/site-packages/markupsafe/

Please advise

Hi @sampath_kumar_krishn,
that issue may be caused by the latest markupsafe update . You can check your markupsafe version by running the command pip show markupsafe and if your are using Version 2.1.0 you can downgrade to 2.0.1 by running pip install markupsafe==2.0.1.
Then check your markupsafe version again to check if changes were effective, restart your bench and try to create the site again.


Thank you.
That solved my install issue. However, I’m unable to access my domain when i try to start the bench. It says server is taking too long to respond. What do i do?

I’m afraid that might be caused by your domain configuration and there may be more than one configuration parameter that you should change. Take a quick look and see if some of these might be useful to solve the connection issue.

@Bradley hey thanks for the input. I got the server and the erpnext instance up and running on my local network by changing my dns. However, I would like to expose this pc to the internet so i can theoretically access this site from anywhere. Are there any suggestion for how i can do that? Thanks a lot again for your help :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.