ERPNext 7 Issues and Info Megathread

I was able to resolve the cryptography error by restarting my server after running pip install cryptography, but now I’ve got this error:

Executing erpnext.patches.v7_0.convert_timelog_to_timesheet in site1.local (1bd3e0294d)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/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/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/site.py”, line 196, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
frappe.modules.patch_handler.run_all()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelog_to_timesheet.py”, line 16, in execute
time_sheet.save(ignore_permissions=True)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in save
self._save(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in save
self.insert()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 231, in insert
self.run_post_save_methods()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 708, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 638, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 816, in composer
return composed(self, method, *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 799, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 632, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 68, in on_submit
self.validate_mandatory_fields()
File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 95, in validate_mandatory_fields
frappe.throw(
(“Row {0}: Billing Rate must be greater than zero.”).format(data.idx))
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 299, in throw
msgprint(msg, raise_exception=exc, title=title)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 292, in msgprint
_raise_exception()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 265, in _raise_exception
raise raise_exception, encode(msg)
frappe.exceptions.ValidationError: Row 1: Billing Rate must be greater than zero.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/ubuntu/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 _process_result(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/ubuntu/bench-repo/bench/commands/update.py”, line 60, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
File “/home/ubuntu/bench-repo/bench/commands/update.py”, line 90, in _update
patch_sites(bench_path=bench_path)
File “/home/ubuntu/bench-repo/bench/utils.py”, line 122, in patch_sites
run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench_path=bench_path)
File “/home/ubuntu/bench-repo/bench/utils.py”, line 451, in run_frappe_cmd
raise CommandFailedError(args)
bench.utils.CommandFailedError: (’–site’, ‘all’, ‘migrate’)

EDIT: I was able to fix this by manually changing the convert_timelog_to_timesheet.py to prevent Billable from being checked (in our company nothing is billable in this way - we just use time logs for tracking employee hours).

after restart i had installed crytography lib . after this i had run bench update --upgrade with frappe user and seems every thing working .

:slight_smile:

@rohit_w can you fix this patch?

Upgrade to v7 success.
But i found two issues:

  1. https://github.com/frappe/erpnext/blob/804b8f7baf4c74f93f82110545d50fb787b0cd4f/erpnext/selling/doctype/quotation/quotation.json
    Line 9 : “default_print_format”: “test123”,
    But there is not print format’s name is test123.

  2. the website_theme.css for a website is empty.

Hi,

I got this following error.

frappe.exceptions.UniqueValidationError: (u’Desktop Icon’, ‘5b2d92fbdd’, IntegrityError(1062, “Duplicate entry ‘Student-Administrator-1’ for key ‘unique_module_name_owner_standard’”))

As I was running the bench update on my Ubuntu server, I am not able to copy paste the entire trace… Can anyone please help with this?

Thanks
Uma

Successfully migrated my local server to v7.

one suggestion, As we have bench switch-to-v5 command, similarly bench switch-to-v6 command is missing

Regards,
Sambhaji Kolate,
New Indictrans Technologies Pvt Ltd.

Issue:
Since the system now remembers the limit of the list so if I click on 500 as the list size for any transaction then there seems to be no way to reduce the limit.

I think the buttons need to show now since after 500 the buttons are not shown and hence the user is stuck with the 500 limit option in list view

There is also an issue with email account for local smtp settings.

Leaving the password field blank as shown below forcibly logs you out

Click Save

Wasn’t an issue in 6.X

@iHello Thanks for reporting this issue. It has been fixed.

Upgrade works after install cryptography lib, but in end getting this error

frappe-bench-frappe-async-worker: stopped frappe-bench-frappe-longjob-worker: stopped frappe-bench-frappe-workerbeat: stopped frappe-bench-frappe-worker: stopped frappe-bench-frappe-web: stopped frappe-bench-node-socketio: stopped frappe-bench-frappe-async-worker: ERROR (abnormal termination) frappe-bench-frappe-longjob-worker: ERROR (abnormal termination) frappe-bench-frappe-workerbeat: ERROR (abnormal termination) frappe-bench-frappe-worker: ERROR (abnormal termination) frappe-bench-node-socketio: started frappe-bench-frappe-web: started

My migration is kind of stuck as I have some custom fields which are getting importing into the db via CSV of my custom fixtures and here is the query which is making my system hang;

+----+-------+-----------+-------+---------+------+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
| Id | User  | Host      | db    | Command | Time | State          | Info                                                                                                                                                                     | Progress |
+----+-------+-----------+-------+---------+------+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
|  3 | rigpl | localhost | rigpl | Query   |  236 | altering table | alter table `tabCommunication` add column `follow_up` int(1) not null default 0, alter column `seen` set default 0, alter column `communication_medium` set default null |    0.000 |
|  4 | root  | localhost | NULL  | Query   |    0 | init           | SHOW FULL PROCESSLIST                                                                                                                                                    |    0.000 |
+----+-------+-----------+-------+---------+------+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+

This issue has also been reported on github at https://github.com/frappe/frappe/issues/1877

This has made bench migrate take very long time almost like 15mins~20mins

Resolved: solution on below link

Abnormal termination errors

Thanks to @tkhamdan

we are migrating v6 to v7
we got following issue (May be related o Role enable/disable feature)

  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 <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 139, in on_update
    make_module_and_roles(self)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 595, in make_module_and_roles
    r.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 212, in insert
    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 <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/role/role.py", line 22, in validate
    if self.disabled:
**AttributeError: 'Role' object has no attribute 'disabled'**

Hello!
i have un error like this anybody help plz
the last time i try to upgrade to V7 it doesn’t success
then now when i run bench it has un error like that

bench Traceback (most recent call last): File "/usr/local/bin/bench", line 9, in <module> load_entry_point('bench', 'console_scripts', 'bench')() File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point return ep.load() File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load return self.resolve() File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/home/frappe/.bench/bench/cli.py", line 3, in <module> from bench.utils import is_root, PatchError, drop_privileges, get_env_cmd, get_cmd_output, get_frappe File "/home/frappe/.bench/bench/utils.py", line 4, in <module> from bench import env ImportError: cannot import name env root@W360S-ERP:/home/frappe#

Hm, first of all you shouldn’t be using the root user, use the frappe user (su frappe) and try updating. If you get something like “Permission denied” run, as root:

chown -R frappe:frappe frappe-bench

Do the same for the bench-repo directory and try updating again.

Yep this is the question i want to ask :slight_smile: still die to wait :slight_smile:
Hello!
what does it mean? normally i often use root user but now it seem tobe un error

During install, a new user is created and everything related to ERPNext is installed into the user’s folder, and given the permission of that user. If you run commands using the root user, you might get issues later because some of your file ownerships might change.

Maybe doing git fetch origin and git checkout master and then git reset --hard origin/master inside the .bench folder as frappe user fix the issue for you

Please post queries on independent threads. This is too chaotic!