ERROR: [Errno 13] Permission denied: './sites/apps.txt'

Hi everyone,

I want to install webshop but i’m resulting in error when I run bench get-app webshop

I’m Using:
ERPNext: v14.62.3

Frappe Framework: v14.65.0

ERROR LOG:

$ bench get-app webshop
A directory for the application 'webshop' already exists. Do you want to continue and overwrite it? [y/N]: n
Do you want to reinstall the existing application? [y/N]: y
Ignoring dependencies of webshop. To install dependencies use --resolve-deps
Installing webshop
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/webshop 
ERROR: [Errno 13] Permission denied: './sites/apps.txt'
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/site-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/bench/commands/make.py", line 181, in get_app
    get_app(
  File "/usr/local/lib/python3.10/site-packages/bench/app.py", line 771, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/usr/local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/bench/app.py", line 254, in install
    install_app(
  File "/usr/local/lib/python3.10/site-packages/bench/app.py", line 916, in install_app
    bench.apps.sync(app_name=app, required=resolution, branch=tag, app_dir=app_path)
  File "/usr/local/lib/python3.10/site-packages/bench/bench.py", line 268, in sync
    with open(self.bench.apps_txt, "w") as f:
PermissionError: [Errno 13] Permission denied: './sites/apps.txt'
INFO: A newer version of bench is available: 5.22.0 → 5.22.3
$ 

Give permissions to ./sites/apps.txt and try once.

You can do it by using a command chmod -R 777 /sites/apps.txt

1 Like

Hi @Kiranmai,

Thank you for the response.

Hi @Kiranmai,

I have successfully get-app webshop

but now when I’m installing, it is giving me another error:

$ bench install-app webshop

Installing payments...
Updating DocTypes for payments      : [========================================] 100%
* Installing Payment Custom Fields in Web Form
Updating Dashboard for payments
App erpnext already installed

Installing webshop...
An error occurred while installing webshop: Module import failed for Website Item, the DocType you're trying to open might be deleted.<br> Error: No module named 'redis.commands'
Traceback (most recent call last):
  File "apps/frappe/frappe/modules/utils.py", line 241, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(module_name)
  File "apps/frappe/frappe/__init__.py", line 1329, in get_module
    return importlib.import_module(modulename)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "apps/webshop/webshop/webshop/doctype/website_item/website_item.py", line 17, in <module>
    from webshop.webshop.doctype.item_review.item_review import get_item_reviews
  File "apps/webshop/webshop/webshop/doctype/item_review/item_review.py", line 13, in <module>
    from webshop.webshop.doctype.webshop_settings.webshop_settings import (
  File "apps/webshop/webshop/webshop/doctype/webshop_settings/webshop_settings.py", line 10, in <module>
    from webshop.webshop.redisearch_utils import (
  File "apps/webshop/webshop/webshop/redisearch_utils.py", line 10, in <module>
    from redis.commands.search.field import TagField, TextField
ModuleNotFoundError: No module named 'redis.commands'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 400, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/installer.py", line 295, in install_app
    sync_for(name, force=force, reset_permissions=True)
  File "apps/frappe/frappe/model/sync.py", line 109, in sync_for
    import_file_by_path(
  File "apps/frappe/frappe/modules/import_file.py", line 148, in import_file_by_path
    import_doc(
  File "apps/frappe/frappe/modules/import_file.py", line 245, in import_doc
    doc.insert()
  File "apps/frappe/frappe/model/document.py", line 287, in insert
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1066, in run_post_save_methods
    self.run_method("on_update")
  File "apps/frappe/frappe/model/document.py", line 899, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1251, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1233, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 896, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 409, in on_update
    self.run_module_method("on_doctype_update")
  File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 507, in run_module_method
    module = load_doctype_module(self.name, self.module)
  File "apps/frappe/frappe/modules/utils.py", line 245, in load_doctype_module
    raise ImportError(msg) from e
ImportError: Module import failed for Website Item, the DocType you're trying to open might be deleted.<br> Error: No module named 'redis.commands'

$

Hi @harshvadhiya,

The web shop is for version 15, not version 14. The name of the website item has been changed to the webshop item. In version 14, the webshop-related functionality is already available.

The E-Commerce platform is separated from version 14 hence its name is WebShop.

please check the documentation.

Thank You!

1 Like