Skip to content

Cannot install Assets App (Installation ERROR) #3

@ashaseeb

Description

@ashaseeb

bench get-app --branch main https://github.com/frappe/assets.git

INSTALLATION ERROR:

TypeError: expected str, bytes or os.PathLike object, not NoneType

occurs because assets app does not have a proper Python module structure. Specifically, frappe.build.py expects every app to have a Python package (a folder with init.py), but assets is mostly a static files app. Hence, pymodule.file is None, which breaks the build step.


ERROR DETAIL:

bench get-app --branch main https://github.com/frappe/assets.git Getting assets $ git clone https://github.com/frappe/assets.git --branch main --depth 1 --origin upstream Cloning into 'assets'... remote: Enumerating objects: 127, done. remote: Counting objects: 100% (127/127), done. remote: Compressing objects: 100% (111/111), done. remote: Total 127 (delta 35), reused 55 (delta 10), pack-reused 0 (from 0) Receiving objects: 100% (127/127), 87.37 KiB | 1.18 MiB/s, done. Resolving deltas: 100% (35/35), done. Ignoring dependencies of https://github.com/frappe/assets.git. To install dependencies use --resolve-deps Installing assets $ /home/i36t/frappe_demo/env/bin/python -m pip install --quiet --upgrade -e /home/i36t/frappe_demo/apps/assets DEPRECATION: Legacy editable install of assets==0.0.1 from file:///home/i36t/frappe_demo/apps/assets (setup.py develop) is deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at pypa/pip#11457 $ bench build --app assets Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/i36t/frappe_demo/apps/frappe/frappe/utils/bench_helper.py", line 114, in main() File "/home/i36t/frappe_demo/apps/frappe/frappe/utils/bench_helper.py", line 20, in main click.Group(commands=commands)(prog_name="bench") File "/home/i36t/frappe_demo/env/lib/python3.12/site-packages/click/core.py", line 1442, in call return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/i36t/frappe_demo/env/lib/python3.12/site-packages/click/core.py", line 1363, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/i36t/frappe_demo/env/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/i36t/frappe_demo/env/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/i36t/frappe_demo/env/lib/python3.12/site-packages/click/core.py", line 1226, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/i36t/frappe_demo/env/lib/python3.12/site-packages/click/core.py", line 794, in invoke return callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/i36t/frappe_demo/apps/frappe/frappe/commands/utils.py", line 77, in build bundle( File "/home/i36t/frappe_demo/apps/frappe/frappe/build.py", line 233, in bundle setup() File "/home/i36t/frappe_demo/apps/frappe/frappe/build.py", line 219, in setup app_paths = [os.path.dirname(pymodule.file) for pymodule in pymodules] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 181, in dirname TypeError: expected str, bytes or os.PathLike object, not NoneType ERROR: bench build --app assets subprocess.CalledProcessError: Command 'bench build --app assets' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/bin/bench", line 8, in sys.exit(cli()) ^^^^^ File "/usr/local/lib/python3.12/dist-packages/bench/cli.py", line 132, in cli bench_command() File "/usr/local/lib/python3.12/dist-packages/bench/commands/make.py", line 181, in get_app get_app( File "/usr/local/lib/python3.12/dist-packages/bench/app.py", line 781, in get_app app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench) File "/usr/local/lib/python3.12/dist-packages/bench/utils/render.py", line 126, in wrapper_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/bench/app.py", line 253, in install install_app( File "/usr/local/lib/python3.12/dist-packages/bench/app.py", line 948, in install_app build_assets(bench_path=bench_path, app=app, using_cached=using_cached) File "/usr/local/lib/python3.12/dist-packages/bench/utils/bench.py", line 404, in build_assets exec_cmd(command, cwd=bench_path, env=env) File "/usr/local/lib/python3.12/dist-packages/bench/utils/init.py", line 184, in exec_cmd raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd) bench.exceptions.CommandFailedError: bench build --app assets

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions