Hello,
While updating to ver 7 I got this error:
Executing erpnext.patches.v7_0.remove_features_setup in site3.local (1dd227d3c8)
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in runmodule_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in runcode
exec code in run_globals
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 664, in call
return self.main(*args, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return processresult(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return processresult(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 203, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 27, in migrate
frappe.modules.patch_handler.run_all()
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
if not run_single(patchmodule = patch):
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v7_0/remove_features_setup.py", line 10, in execute
stock_settings.save()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 242, in save
self._save(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 269, in _save
self.run_before_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 687, in run_before_save_methods
self.run_method("validate")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 638, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 816, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 799, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 632, in
fn = lambda self, args, **kwargs: getattr(self, method)(args, **kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_settings/stock_settings.py", line 18, in validate
self.get("item_naming_by")=="Naming Series", hide_name_field=True)
File
"/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/naming_series/naming_series.py",
line 170, in set_by_naming_series
make_property_setter(doctype, "naming_series", "reqd", 0, "Check")
File
"/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/property_setter/property_setter.py",
line 70, in make_property_setter
property_setter.insert()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in insert
self.run_post_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 705, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 638, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 816, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 799, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 632, in
fn = lambda self, args, **kwargs: getattr(self, method)(args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/property_setter/property_setter.py", line 55, in on_update
validate_fields_for_doctype(self.doc_type)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 258, in validate_fields_for_doctype
validate_fields(frappe.get_meta(doctype, cached=False))
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 456, in validate_fields
check_illegal_default(d)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 326, in check_illegal_default
frappe.throw(_("Default for 'Check' type of field must be either '0' or '1'"))
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 299, in throw
msgprint(msg, raise_exception=exc, title=title)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 292, in msgprint
raiseexception()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 265, in raiseexception
raise raise_exception, encode(msg)
frappe.exceptions.ValidationError: Default for 'Check' type of field must be either '0' or '1'
Traceback (most recent call last):
File "/usr/local/bin/bench", line 9, in
load_entry_point('bench==0.1', 'console_scripts', 'bench')()
File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
bench_command()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
return processresult(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/home/frappe/bench-repo/bench/commands/update.py", line 60, in update
update(pull, patch, build, bench, auto, restartsupervisor, requirements, no_backup, upgrade, force=force)
File "/home/frappe/bench-repo/bench/commands/update.py", line 90, in _update
patch_sites(bench_path=bench_path)
File "/home/frappe/bench-repo/bench/utils.py", line 124, in patch_sites
run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
File "/home/frappe/bench-repo/bench/utils.py", line 453, in run_frappe_cmd
raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')
Then I was asked to download Cryptography, that as well gave the error:
root@work:/home/frappe/frappe-bench# pip install cryptography
Collecting cryptography
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/uti l/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available
. This prevents urllib3 from configuring SSL appropriately and may
cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs. org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading cryptography-1.4.tar.gz (399kB)
100% |ββββββββββββββββββββββββββββββββ| 401kB 1.1MB/s
Collecting idna>=2.0 (from cryptography)
Downloading idna-2.1-py2.py3-none-any.whl (54kB)
100% |ββββββββββββββββββββββββββββββββ| 57kB 5.9MB/s
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in /usr/ local/lib/python2.7/dist-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/loc al/lib/python2.7/dist-packages (from cryptography)
Collecting setuptools>=11.3 (from cryptography)
Downloading setuptools-25.0.0-py2.py3-none-any.whl (442kB)
100% |ββββββββββββββββββββββββββββββββ| 446kB 409kB/s
Collecting enum34 (from cryptography)
Downloading enum34-1.1.6-py2-none-any.whl
Collecting ipaddress (from cryptography)
Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting cffi>=1.4.1 (from cryptography)
Downloading cffi-1.7.0.tar.gz (400kB)
100% |ββββββββββββββββββββββββββββββββ| 401kB 928kB/s
Collecting pycparser (from cffi>=1.4.1->cryptography)
Downloading pycparser-2.14.tar.gz (223kB)
100% |ββββββββββββββββββββββββββββββββ| 225kB 1.8MB/s
Building wheels for collected packages: cryptography, cffi, pycparser
Running setup.py bdist_wheel for cryptography
Complete output from command /usr/bin/python -c "import setuptools;__file__='/ tmp/pip-build-eCnNkI/cryptography/setup.py';exec(compile(open(__file__).read().r eplace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpchELL4pip-wheel -:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-eCnNkI/cryptography/setup.py", line 333, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 239, in __i nit__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 264, in fet ch_build_eggs
replace_conflicting=True
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 620, in resol ve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 858, in best_ match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 870, in obtai n
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 314, in fet ch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 616, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 646, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 834, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1040, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1028, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_ 64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cryptography
Running setup.py bdist_wheel for cffi
Complete output from command /usr/bin/python -c "import setuptools;__file__='/ tmp/pip-build-eCnNkI/cffi/setup.py';exec(compile(open(__file__).read().replace(' \r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpMlcQHEpip-wheel-:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/api.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/model.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-2.7/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-2.7/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-2.7/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/c
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wa ll -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/lib ffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7 /c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cffi
Running setup.py bdist_wheel for pycparser
Stored in directory: /root/.cache/pip/wheels/9b/f4/2e/d03e949a551719a1ffcb659f 2c63d8444f4df12e994ce52112
Successfully built pycparser
Failed to build cryptography cffi
Installing collected packages: idna, setuptools, enum34, ipaddress, pycparser, c ffi, cryptography
Found existing installation: setuptools 3.3
Uninstalling setuptools-3.3:
Successfully uninstalled setuptools-3.3
Running setup.py install for cffi
Complete output from command /usr/bin/python -c "import setuptools, tokenize ;__file__='/tmp/pip-build-eCnNkI/cffi/setup.py';exec(compile(getattr(tokenize, ' open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-wCWPLQ-record/install-record.txt --single-version-externally- managed --compile:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
running install
running build
running build_py
running build_ext
building '_cffi_backend' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 - Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/l ibffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2 .7/c/_cffi_backend.o
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-buil d-eCnNkI/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).r ead().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-wCWPL Q-record/install-record.txt --single-version-externally-managed --compile" faile d with error code 1 in /tmp/pip-build-eCnNkI/cffi
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/uti l/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available
. This prevents urllib3 from configuring SSL appropriately and may
cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs. org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Can you please help me urgently, since my whole office is stuck today and yesterday?
Regards,
Ahmed