Have fixed the patch we’ll release this in next update.
Hi @rohit_w
Trust you had a great weekend. I just tried running the update again but still getting an error:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, 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/frappe/frappe1-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
main()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/commands/site.py", line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/migrate.py", line 31, in migrate
frappe.modules.patch_handler.run_all()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
if not run_single(patchmodule = patch):
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelog_to_timesheet.py", line 36, in execute
time_sheet.save(ignore_permissions=True)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 279, in _save
self.insert()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 245, in insert
self.run_post_save_methods()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 890, in run_post_save_methods
self.run_method("on_submit")
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 106, in on_submit
self.update_task_and_project()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 163, in update_task_and_project
task.save()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 307, in _save
self.run_post_save_methods()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/task/task.py", line 69, in on_update
self.reschedule_dependent_tasks()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/task/task.py", line 126, in reschedule_dependent_tasks
""", {'project': self.project, 'task':self.name }, as_dict=1):
File "/home/frappe/frappe1-bench/apps/frappe/frappe/database.py", line 166, in sql
self._cursor.execute(query, values)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 165, in execute
result = self._query(query)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 321, in _query
conn.query(q)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 860, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1061, in _read_query_result
result.read()
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1349, in read
first_packet = self.connection._read_packet()
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1018, in _read_packet
packet.check_error()
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 384, in check_error
err.raise_mysql_exception(self._data)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1054, u"Unknown column 'child.project' in 'where clause'")
Where do I add this column?
Thanks
run below command and try
bench --force --site <your-site-name> reload-doc projects doctype task_depends_on
Hi @rohit_w, thanks for the quick response. It now says DocType Project Type not found!
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, 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/frappe/frappe1-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
main()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/commands/site.py", line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/migrate.py", line 31, in migrate
frappe.modules.patch_handler.run_all()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
if not run_single(patchmodule = patch):
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelog_to_timesheet.py", line 36, in execute
time_sheet.save(ignore_permissions=True)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 279, in _save
self.insert()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 245, in insert
self.run_post_save_methods()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 890, in run_post_save_methods
self.run_method("on_submit")
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 106, in on_submit
self.update_task_and_project()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 163, in update_task_and_project
task.save()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 307, in _save
self.run_post_save_methods()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/task/task.py", line 70, in on_update
self.update_project()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/task/task.py", line 97, in update_project
frappe.get_doc("Project", self.project).update_project()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/project/project.py", line 128, in update_project
self.save(ignore_permissions = True)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 289, in _save
self._validate_links()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 714, in _validate_links
invalid_links, cancelled_links = self.get_invalid_links()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/base_document.py", line 462, in get_invalid_links
if frappe.get_meta(doctype).issingle:
File "/home/frappe/frappe1-bench/apps/frappe/frappe/__init__.py", line 655, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/meta.py", line 33, in get_meta
lambda: Meta(doctype))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 173, in hget
value = generator()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/meta.py", line 33, in <lambda>
lambda: Meta(doctype))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/meta.py", line 72, in __init__
super(Meta, self).__init__("DocType", doctype)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 103, in __init__
self.load_from_db()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/meta.py", line 77, in load_from_db
super(Meta, self).load_from_db()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 140, in load_from_db
frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/__init__.py", line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red')
File "/home/frappe/frappe1-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
_raise_exception()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/__init__.py", line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.DoesNotExistError: DocType Project Type not found
How to proceed?
bench --force --site reload-doc projects doctype project
Hi @rohit_w
I tried that but the error persists! It still says DocType Project Type not found
Thanks
if you know how to Access SQL and run Command. try following command.
select * from tabDocType
where name=‘Project’;
if it’s showing result then it should work. else we can do a manual insert to bypass this error. (Manual insertion is not recommended)
I tried bench --force --site <My Site> reload-doc projects doctype project_type
and now I get the following error:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, 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/frappe/frappe1-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
main()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe1-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/commands/site.py", line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/migrate.py", line 31, in migrate
frappe.modules.patch_handler.run_all()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
if not run_single(patchmodule = patch):
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/patches/v7_0/convert_timelog_to_timesheet.py", line 36, in execute
time_sheet.save(ignore_permissions=True)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 279, in _save
self.insert()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 245, in insert
self.run_post_save_methods()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 890, in run_post_save_methods
self.run_method("on_submit")
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 106, in on_submit
self.update_task_and_project()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py", line 163, in update_task_and_project
task.save()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 307, in _save
self.run_post_save_methods()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1024, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 1007, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/task/task.py", line 70, in on_update
self.update_project()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/task/task.py", line 97, in update_project
frappe.get_doc("Project", self.project).update_project()
File "/home/frappe/frappe1-bench/apps/erpnext/erpnext/projects/doctype/project/project.py", line 128, in update_project
self.save(ignore_permissions = True)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 256, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 289, in _save
self._validate_links()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/model/document.py", line 724, in _validate_links
frappe.LinkValidationError)
File "/home/frappe/frappe1-bench/apps/frappe/frappe/__init__.py", line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red')
File "/home/frappe/frappe1-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
_raise_exception()
File "/home/frappe/frappe1-bench/apps/frappe/frappe/__init__.py", line 282, in _raise_exception
raise raise_exception(encode(msg))
frappe.exceptions.LinkValidationError: Could not find Project Type: External
Any ideas?
Try below commands
bench --force --site reload-doc projects doctype project_type
Hi @adnan
Thanks for your input. ERROR 1054 (42S22): Unknown column '‘Project’' in 'where clause'
When I try the query without quotes ERROR 1054 (42S22): Unknown column 'Project' in 'where clause'
Apparently it’s because there was an issue with the syntax. When I ran it correctly, it returned a result. I also checked for project_type and got the result below:
MariaDB [6a3xxxxxxx]> SELECT * FROM tabDocType WHERE name='project_type';
Empty set (0.00 sec)
Hi @rohit_w
Trust you’re doing great. Any other suggestions for getting past this error would be most appreciated
Many thanks