Hello,
When I want to install a new app on the site, I got this error:
The command to create a new app :
yawar-frappe@yict:~/frappe-bench$ bench new-app Demo_App
App Title [Demo App]:
App Description: This is a demo app for development
App Publisher: Yawar ICT
App Email: omid.ahraar@gmail.com
App License (agpl-3.0, apache-2.0, bsd-2-clause, bsd-3-clause, bsl-1.0, cc0-1.0, epl-2.0, gpl-2.0, gpl-3.0, lgpl-2.1, mit, mpl-2.0, unlicense) [mit]:
Create GitHub Workflow action for unittests [y/N]: N
'demo_app' created at /home/yawar-frappe/frappe-bench/apps/demo_app
Installing demo_app
$ /home/yawar-frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/yawar-frappe/frappe-bench/apps/demo_app
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
WARNING: Ignoring invalid distribution ~rappe (/home/yawar-frappe/frappe-bench/env/lib/python3.11/site-packages)
$ bench build --app demo_app
Linking /home/yawar-frappe/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules ✔ Application Assets Linked
yarn run v1.22.21
$ node esbuild --apps demo_app --run-build-command
File Size
DONE Total Build Time: 220.682ms
WARN Cannot connect to redis_cache to update assets_json
WARN Cannot connect to redis_cache to update assets_json
WARN Cannot connect to redis_cache to update assets_json
Done in 1.42s.
$ supervisorctl restart frappe-bench-web:
frappe-bench-web:frappe-bench-node-socketio: ERROR (spawn error)
frappe-bench-web:frappe-bench-frappe-web: started
WARN: restarting supervisor group `frappe-bench-web:` failed. Use `bench restart` to retry.
$ supervisorctl restart frappe-bench-workers:
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
The next step, command bench start
will not be executed and command bench start
will work again by using the following commands:
sudo supervisorctl stop all
sudo service nginx stop
sudo bench setup requirements
sudo bench setup socketio
sudo bench setup config
sudo bench setup redis
sudo bench setup supervisor
sudo bench setup procfile
bench start
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.
virtualenv 20.25.0 requires filelock<4,>=3.12.2, but you have filelock 3.8.2 which is incompatible.
When I try to install the new app , I got this error :
yawar-frappe@yict:~/frappe-bench$ bench install-app Demo_app
Could not find app "Demo_app":
No module named 'Demo_app'
An error occurred while installing Demo_app: No module named 'Demo_app'
Traceback with variables (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 446, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {'sites': ['yawarerp.com'], 'force': False, 'verbose': False, 'profile': False}
apps = ('Demo_app',)
force = False
_install_app = <function install_app at 0x7f4ea8dd8f40>
filelock = <function filelock at 0x7f4ea8dce520>
exit_code = 0
site = 'yawarerp.com'
app = 'Demo_app'
err = ModuleNotFoundError("No module named 'Demo_app'")
File "apps/frappe/frappe/installer.py", line 264, in install_app
app_hooks = frappe.get_hooks(app_name=name)
name = 'Demo_app'
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7f4ea83ad080>
sync_for = <function sync_for at 0x7f4ea83adee0>
sync_customizations = <function sync_customizations at 0x7f4ea8f4da80>
sync_fixtures = <function sync_fixtures at 0x7f4ea83ae200>
File "apps/frappe/frappe/__init__.py", line 1574, in get_hooks
hooks = _dict(_load_app_hooks(app_name))
hook = None
default = '_KEEP_DEFAULT_LIST'
app_name = 'Demo_app'
File "apps/frappe/frappe/utils/caching.py", line 57, in wrapper
return_val = func(*args, **kwargs)
args = ('Demo_app',)
kwargs = {}
args_key = ********
func = <function _load_app_hooks at 0x7f4eaa010f40>
File "apps/frappe/frappe/__init__.py", line 1548, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
app_name = 'Demo_app'
hooks = {}
apps = ['Demo_app']
app = 'Demo_app'
types = <module 'types' from '/usr/lib/python3.11/types.py'>
File "apps/frappe/frappe/__init__.py", line 1414, in get_module
return importlib.import_module(modulename)
modulename = 'Demo_app.hooks'
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
name = 'Demo_app.hooks'
package = None
level = 0
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
name = 'Demo_app.hooks'
package = None
level = 0
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
name = 'Demo_app.hooks'
import_ = <function _gcd_import at 0x7f4eab81fd80>
module = <exception while printing> Traceback (most recent call last):
File "env/lib/python3.11/site-packages/traceback_with_variables/core.py", line 222, in _to_cropped_str
raw = print_(obj)
^^^^^^^^^^^
File "apps/frappe/frappe/utils/__init__.py", line 327, in dict_printer
if key in v:
^^^^^^^^
TypeError: argument of type 'object' is not iterable
File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
name = 'Demo_app.hooks'
import_ = <function _gcd_import at 0x7f4eab81fd80>
path = None
parent = 'Demo_app'
parent_spec = None
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
f = <function _gcd_import at 0x7f4eab81fd80>
args = ('Demo_app',)
kwds = {}
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
name = 'Demo_app'
package = None
level = 0
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
name = 'Demo_app'
import_ = <function _gcd_import at 0x7f4eab81fd80>
module = <exception while printing> Traceback (most recent call last):
File "env/lib/python3.11/site-packages/traceback_with_variables/core.py", line 222, in _to_cropped_str
raw = print_(obj)
^^^^^^^^^^^
File "apps/frappe/frappe/utils/__init__.py", line 327, in dict_printer
if key in v:
^^^^^^^^
TypeError: argument of type 'object' is not iterable
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
name = 'Demo_app'
import_ = <function _gcd_import at 0x7f4eab81fd80>
path = None
parent = ''
parent_spec = None
spec = None
builtins.ModuleNotFoundError: No module named 'Demo_app'