Bench init error on update_npm_packages function

Hi guys,

I’m trying to install on opensuse leap 42.2 and i’m getting this error:

frappe@p:~> bench init frappe-bench
INFO:bench.utils:virtualenv -q env -p /usr/bin/python3
Already using interpreter /usr/bin/python3
INFO:bench.utils:./env/bin/pip -q install --upgrade pip
INFO:bench.utils:./env/bin/pip -q install wheel
INFO:bench.utils:./env/bin/pip -q install six
INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --origin upstream
Cloning into ‘frappe’…
remote: Counting objects: 132795, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 132795 (delta 6), reused 0 (delta 0), pack-reused 132765
Receiving objects: 100% (132795/132795), 102.10 MiB | 4.98 MiB/s, done.
Resolving deltas: 100% (100400/100400), done.
installing frappe
INFO:bench.app:installing frappe
INFO:bench.utils:frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir
Updating node libraries…
Traceback (most recent call last):
File “/usr/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/srv/pixem/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/lib64/python3.4/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/lib64/python3.4/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/lib64/python3.4/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python3.4/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python3.4/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/srv/pixem/frappe/bench-repo/bench/commands/make.py”, line 19, in init
verbose=verbose, clone_from=clone_from)
File “/srv/pixem/frappe/bench-repo/bench/utils.py”, line 64, in init
update_npm_packages(bench_path=path)
File “/srv/pixem/frappe/bench-repo/bench/utils.py”, line 414, in update_npm_packages
for key, value in app_package_json.iteritems():
AttributeError: ‘dict’ object has no attribute ‘iteritems’

No logs are generated on frappe-bench/logs folder.

Can you please point me what could be happening?

Thanks!

Please check node version. if node version is < 5.x then upgrade node.

Check your python version.

@saurabh6790, node version is 6.1 :wink:

@netchampfaris, I think this is the problem. The python version is 3. :smiley:

Thanks!

The problem is with python 3. Only the develop branch is presently (experimentally) python 3 compatible. Work on python 3 compatibility is on. For now, use python 2

@tundebabzy, yes, thanks! :slight_smile: