Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in installing with version 14 #192

Closed
malnozili opened this issue Oct 30, 2023 · 7 comments
Closed

in installing with version 14 #192

malnozili opened this issue Oct 30, 2023 · 7 comments

Comments

@malnozili
Copy link

malnozili commented Oct 30, 2023

Traceback (most recent call last):
  File "/home/malnozili/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/malnozili/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
    main()
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/env/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/env/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/env/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/env/lib/python3.10/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/apps/frappe/frappe/commands/site.py", line 410, in install_app
    frappe.init(site=site)
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/apps/frappe/frappe/__init__.py", line 251, in init
    setup_module_map()
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/apps/frappe/frappe/__init__.py", line 1550, in setup_module_map
    for module in get_module_list(app):
  File "/home/malnozili/erpnext/vm/v14/try-fintechsys-bench/apps/frappe/frappe/__init__.py", line 1390, in get_module_list
    return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), "modules.txt"))
  File "/home/malnozili/.pyenv/versions/3.10.0/lib/python3.10/posixpath.py", line 154, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
@BreadGenie
Copy link
Member

Can you explain a bit more about when and where this happens? Does it happen while you're running bench get-app?

@JoSoG89
Copy link

JoSoG89 commented Nov 7, 2023

Can you explain a bit more about when and where this happens? Does it happen while you're running bench get-app?

after get-app

Getting wiki
$ git clone https://github.com/frappe/wiki --branch version-14 --depth 1 --origin upstream
Cloning into 'wiki'...
remote: Enumerating objects: 135, done.
remote: Counting objects: 100% (135/135), done.
remote: Compressing objects: 100% (120/120), done.
remote: Total 135 (delta 17), reused 55 (delta 3), pack-reused 0
Receiving objects: 100% (135/135), 1.60 MiB | 3.46 MiB/s, done.
Resolving deltas: 100% (17/17), done.
Ignoring dependencies of https://github.com/frappe/wiki. To install dependencies use --resolv                                                                                                e-deps
Installing wiki
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/f                                                                                                rappe-bench/apps/wiki
DEPRECATION: dropbox 11.36.0 has a non-standard dependency specifier stone>=2.*. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of dropbox or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
frappe 15.0.0.dev0 requires redis~=4.5.5, but you have redis 3.5.3 which is incompatible.
rq 1.15.1 requires redis>=4.0.0, but you have redis 3.5.3 which is incompatible.
$ yarn install
yarn install v1.22.19
warning ../../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 2.42s.
$ bench build --app wiki
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1685, in invoke
    super().invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 44, in app_group
    ctx.obj = {"sites": get_sites(site), "force": force, "verbose": verbose, "profile": profile}
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 56, in get_sites
    elif default_site := frappe.get_conf().default_site:
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 374, in get_conf
    with init_site(site):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 384, in __enter__
    init(self.site)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 247, in init
    setup_redis_cache_connection()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 404, in setup_redis_cache_connection
    from frappe.utils.redis_wrapper import RedisWrapper
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 7, in <module>
    from redis.commands.search import Search
ModuleNotFoundError: No module named 'redis.commands'
ERROR: bench build --app wiki
subprocess.CalledProcessError: Command 'bench build --app wiki' 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 <module>
    sys.exit(cli())
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/commands/make.py", line 167, in get_app
    get_app(
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 444, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 242, in install
    install_app(
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/app.py", line 586, in install_app
    build_assets(bench_path=bench_path, app=app)
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 351, in build_assets
    exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
  File "/home/frappe/.local/lib/python3.10/site-packages/bench/utils/__init__.py", line 158, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app wiki

@BreadGenie
Copy link
Member

You're using Frappe v15/develop. So use master branch of Wiki instead of version-14.

@JoSoG89
Copy link

JoSoG89 commented Nov 7, 2023

You're using Frappe v15/develop. So use master branch of Wiki instead of version-14.

ok, you true, in get-app all ok.

But in install-app

Installing wiki...
An error occurred while installing wiki: Module import failed for Wiki Page, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.wiki_page'
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 1408, in get_module
    return importlib.import_module(modulename)
  File "/usr/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 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'frappe.core.doctype.wiki_page'

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

Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 462, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/installer.py", line 306, in install_app
    frappe.get_attr(after_install)()
  File "apps/wiki/wiki/install.py", line 10, in after_install
    page = frappe.new_doc("Wiki Page")
  File "apps/frappe/frappe/__init__.py", line 1120, in new_doc
    new_doc = get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
  File "apps/frappe/frappe/model/create_new.py", line 22, in get_new_doc
    frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
  File "apps/frappe/frappe/model/create_new.py", line 35, in make_new_doc
    doc = frappe.get_doc(
  File "apps/frappe/frappe/__init__.py", line 1265, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 80, in get_doc
    controller = get_controller(doctype)
  File "apps/frappe/frappe/model/base_document.py", line 69, in get_controller
    site_controllers[doctype] = import_controller(doctype)
  File "apps/frappe/frappe/model/base_document.py", line 94, in import_controller
    module = load_doctype_module(doctype, module_name)
  File "apps/frappe/frappe/modules/utils.py", line 245, in load_doctype_module
    raise ImportError(msg) from e
ImportError: Module import failed for Wiki Page, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.wiki_page'

@BreadGenie
Copy link
Member

Try on a new bench. This looks like an after effect of what went wrong from installing version-14 Wiki

@JoSoG89
Copy link

JoSoG89 commented Nov 7, 2023

Try on a new bench. This looks like an after effect of what went wrong from installing version-14 Wiki

i dont think, i rebuild my server from the backup before try to install.

@ankush
Copy link
Member

ankush commented Jan 1, 2024

#208

@ankush ankush closed this as completed Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants