frappe / lms

Easy to Use, 100% Open Source Learning Management System
https://frappe.io/learning
GNU Affero General Public License v3.0
997 stars 458 forks source link

After uninstalling app, ERP is not working #369

Closed tsmanagers closed 2 years ago

tsmanagers commented 2 years ago

We have uninstalled the LMS app after that, we are getting many errors. When we click on the User page, we get the below error, and it stops us from creating a new user or listing an existing users or creating a new employee.

Screenshot. image

For many other pages we are getting error for "exception": "KeyError: 'employee'"

App Versions { "erpnext": "13.36.5", "frappe": "13.39.1", }

Route query-report/Employee Leave Balance

Error Report Traceback (most recent call last): File "apps/frappe/frappe/app.py", line 69, in application response = frappe.api.handle() File "apps/frappe/frappe/api.py", line 55, in handle return frappe.handler.handle() File "apps/frappe/frappe/handler.py", line 38, in handle data = execute_cmd(cmd) File "apps/frappe/frappe/handler.py", line 76, in execute_cmd return frappe.call(method, frappe.form_dict) File "apps/frappe/frappe/init.py", line 1457, in call return fn(*args, *newargs) File "apps/frappe/frappe/init.py", line 767, in wrapper_fn retval = fn(args, get_newargs(fn, kwargs)) File "apps/frappe/frappe/desk/query_report.py", line 256, in run result = generate_report_result(report, filters, user, custom_columns, is_tree, parent_field) File "apps/frappe/frappe/init.py", line 767, in wrapper_fn retval = fn(*args, **get_newargs(fn, kwargs)) File "apps/frappe/frappe/desk/query_report.py", line 117, in generate_report_result result = get_filtered_data(report.ref_doctype, columns, result, user) File "apps/frappe/frappe/desk/query_report.py", line 593, in get_filtered_data if linked_doctypes.get(ref_doctype) and shared and row[linked_doctypes[ref_doctype]] in shared: KeyError: 'employee' Request Data { "type": "GET", "args": { "report_name": "Employee Leave Balance", "filters": "{\"from_date\":\"2021-04-01\",\"to_date\":\"2022-03-31\",\"company\":\"Techseria Private Limited\",\"employee_status\":\"Active\"}" }, "headers": {}, "error_handlers": {}, "url": "/api/method/frappe.desk.query_report.run" } Response JSON { "exception": "KeyError: 'employee'" }

tsmanagers commented 2 years ago

another error

image

Please type some additional information that could help us reproduce this issue: App Versions { "erpnext": "13.37.0", "frappe": "13.40.0", } Route Form/Employee/HR-EMP-00039 Error Report Traceback (most recent call last): File "apps/frappe/frappe/app.py", line 69, in application response = frappe.api.handle() File "apps/frappe/frappe/api.py", line 55, in handle return frappe.handler.handle() File "apps/frappe/frappe/handler.py", line 38, in handle data = execute_cmd(cmd) File "apps/frappe/frappe/handler.py", line 76, in execute_cmd return frappe.call(method, frappe.form_dict) File "apps/frappe/frappe/init.py", line 1457, in call return fn(*args, *newargs) File "apps/frappe/frappe/desk/form/save.py", line 24, in savedocs doc.save() File "apps/frappe/frappe/model/document.py", line 310, in save return self._save(args, kwargs) File "apps/frappe/frappe/model/document.py", line 364, in _save self.run_post_save_methods() File "apps/frappe/frappe/model/document.py", line 1085, in run_post_save_methods self.run_method("on_update") File "apps/frappe/frappe/model/document.py", line 941, in run_method out = Document.hook(fn)(self, *args, kwargs) File "apps/frappe/frappe/model/document.py", line 1261, in composer return composed(self, method, *args, *kwargs) File "apps/frappe/frappe/model/document.py", line 1243, in runner add_to_return_value(self, fn(self, args, kwargs)) File "apps/frappe/frappe/model/document.py", line 938, in fn return method_object(*args, *kwargs) File "apps/erpnext/erpnext/hr/doctype/employee/employee.py", line 96, in on_update self.update_user() File "apps/erpnext/erpnext/hr/doctype/employee/employee.py", line 158, in update_user user.save() File "apps/frappe/frappe/model/document.py", line 310, in save return self._save(args, **kwargs) File "apps/frappe/frappe/model/document.py", line 363, in _save self.update_children() File "apps/frappe/frappe/model/document.py", line 395, in update_children self.update_child_table(df.fieldname, df) File "apps/frappe/frappe/model/document.py", line 433, in update_child_table frappe.db.sql( File "apps/frappe/frappe/database/database.py", line 174, in sql self._cursor.execute(query, values) File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 148, in execute result = self._query(query) File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 310, in _query conn.query(q) File "env/lib/python3.8/site-packages/pymysql/connections.py", line 548, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "env/lib/python3.8/site-packages/pymysql/connections.py", line 775, in _read_query_result result.read() File "env/lib/python3.8/site-packages/pymysql/connections.py", line 1156, in read first_packet = self.connection._read_packet() File "env/lib/python3.8/site-packages/pymysql/connections.py", line 725, in _read_packet packet.raise_for_error() File "env/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error err.raise_mysql_exception(self._data) File "env/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.ProgrammingError: (1146, "Table '_7ccb36d7574ec6a5.tabEducation Detail' doesn't exist") Request Data { "type": "POST", "args": { "doc": "{\"name\":\"HR-EMP-00039\",\"owner\":\"niraj@abc.com\",\"creation\":\"2022-06-25 12:10:33.862214\",\"modified\":\"2022-07-26 18:11:42.349402\",\"modified_by\":\"jyoti.sharma@abc.com\",\"idx\":0,\"docstatus\":0,\"employee\":\"HR-EMP-00039\",\"naming_series\":\"HR-EMP-\",\"first_name\":\"Jyoti\",\"middle_name\":\"\",\"last_name\":\"Sharma\",\"salutation\":\"\",\"employee_name\":\"Jyoti Sharma\",\"pan\":\"ETZPS6284Q\",\"aadhaar_no\":\"384049773957\",\"employment_type\":\"Full-time\",\"company\":\"Techseria Private Limited\",\"status\":\"Active\",\"gender\":\"Female\",\"date_of_birth\":\"1995-10-04\",\"date_of_joining\":\"2022-06-01\",\"person_to_be_contacted\":\"ANKIT SHARMA\",\"relation\":\"ELDER BROTHER\",\"emergency_phone_number\":\"9601031031\",\"user_id\":\"jyoti.sharma@abc.com\",\"create_user_permission\":0,\"scheduled_confirmation_date\":\"2022-05-01\",\"final_confirmation_date\":\"2022-05-03\",\"notice_number_of_days\":60,\"cost_per_hour\":0,\"date_of_retirement\":\"2055-10-04\",\"department\":\"Accounts - TPL\",\"designation\":\"Accountant\",\"reports_to\":\"HR-EMP-00026\",\"branch\":\"AHM-Titanium-City-Center\",\"expense_approver\":\"niraj@abc.com\",\"leave_approver\":\"niraj@abc.com\",\"shift_request_approver\":\"niraj@abc.com\",\"holiday_list\":\"Holidays-2223\",\"default_shift\":\"\",\"salary_mode\":\"Bank\",\"payroll_cost_center\":\"Main - TPL\",\"pan_number\":\"ETZPSddddQ\",\"bank_name\":\"SCB\",\"bank_ac_no\":\"23000000\",\"ifsc_code\":\"abc0036051\",\"cell_number\":\"83201xxxxx\",\"prefered_email\":\"jyoti.sharma@abc\",\"personal_email\":\"jyoti65352@pqr.com\",\"unsubscribed\":0,\"permanent_accommodation_type\":\"Owned\",\"permanent_address\":\"97/,New fullchand Chawl, OPP.\nManiben Eye Hospital,\nSaraspur,\nAhmedabad-380018\",\"prefered_contact_email\":\"\",\"company_email\":\"jyoti.sharma@abc\",\"current_accommodation_type\":\"Owned\",\"current_address\":\"97/,New fullchand Chawl, OPP.\nManiben Eye Hospital,\nSaraspur,\nAhmedabad-380018\",\"marital_status\":\"Single\",\"blood_group\":\"B+\",\"leave_encashed\":\"\",\"lft\":71,\"rgt\":72,\"old_parent\":\"HR-EMP-00026\",\"doctype\":\"Employee\",\"education\":[],\"external_work_history\":[],\"internal_work_history\":[],\"last_sync_on\":\"2022-09-03T11:56:57.751Z\",\"unsaved\":1}", "action": "Save" }, "btn": { "jQuery2240419608364607945371": { "events": { "click": [ { "type": "click", "origType": "click", "guid": 951, "namespace": "" } ] } } }, "freeze": true, "headers": {}, "error_handlers": {}, "url": "/api/method/frappe.desk.form.save.savedocs" } Response JSON { "exception": "pymysql.err.ProgrammingError: (1146, \"Table '_7ccb36d7574ec6a5.tabEducation Detail' doesn't exist\")" }

pateljannat commented 2 years ago

@tsmanagers can you share the list of apps that you have on your site with versions? To get this list you can follow these steps

tsmanagers commented 2 years ago

App Versions { "erpnext": "13.36.5", "frappe": "13.39.1", }

Earlier lms app was installed but now we uninstall it

ankush commented 2 years ago

@tsmanagers go to custom fields and delete custom table fields on "User" doctype.

moving to: https://github.com/frappe/lms/issues/393