Update sal_json.py#9
Conversation
| self.emp_id = emp_id | ||
| self.name = name |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| output_file = 'employees.json' | ||
|
|
There was a problem hiding this comment.
suggested comment: output_file = 'employees.csv'
in 49
| print(f"Employee data has been saved to {output_file}") | ||
| except Exception as e: |
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented block in 56
| print(f"An error occurred: {e}") | ||
|
|
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented in 58
| class Emplyee: | ||
| def __init__(self, emp_id, name, position, salary): |
There was a problem hiding this comment.
suggested comment: SyntaxError: expected ':' after class definition
Input in 5
| def __init__(self, emp_id, name, position, salary): | ||
| self.emp_id = emp_id |
There was a problem hiding this comment.
suggested comment: def init(self, emp_id in 6
| self.emp_id = emp_id | ||
| self.name = name |
There was a problem hiding this comment.
suggested comment: AttributeError: 'Employee' object has no attribute in 7
| 'employee_id': self.emp_id, | ||
| 'name': self.name, |
There was a problem hiding this comment.
suggested comment: SyntaxError: invalid syntax
Input: ' in 17
| employee = Emplyee( | ||
| emp_id=row['employee_id'], |
There was a problem hiding this comment.
suggested comment: SyntaxError: expected class or def statement
Input in 32
| emp_id=row['employee_id'], | ||
| name=row['name'], |
There was a problem hiding this comment.
suggested comment: employee_id=row['employee_id in 33
| def main(): | ||
| input_file = 'employees.csv' |
There was a problem hiding this comment.
suggested comment: SyntaxError: invalid syntax
Input: print(" in 47
| input_file = 'employees.csv' | ||
| output_file = 'employees.json' |
There was a problem hiding this comment.
suggested comment:
Input: output_file = 'employees. in 48
| output_file = 'employees.json' | ||
|
|
There was a problem hiding this comment.
suggested comment: output_file = 'employees.csv'
in 49
| employees = read_employees_from_csv(input_file) | ||
| for employee in employees: |
There was a problem hiding this comment.
suggested comment: employees = read_employees_from_csv in 52
| save_employees_to_json(employees, output_file) | ||
| print(f"Employee data has been saved to {output_file}") |
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented block in 55
| print(f"Employee data has been saved to {output_file}") | ||
| except Exception as e: |
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented block in 56
| print(f"An error occurred: {e}") | ||
|
|
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented in 58
| class Emplyee: | ||
| def __init__(self, emp_id, name, position, salary): |
There was a problem hiding this comment.
suggested comment: SyntaxError: expected ':' after class definition
Input in 5
| def __init__(self, emp_id, name, position, salary): | ||
| self.emp_id = emp_id |
There was a problem hiding this comment.
suggested comment: def init(self, emp_id in 6
| self.emp_id = emp_id | ||
| self.name = name |
There was a problem hiding this comment.
suggested comment: AttributeError: 'Employee' object has no attribute in 7
| 'employee_id': self.emp_id, | ||
| 'name': self.name, |
There was a problem hiding this comment.
suggested comment: SyntaxError: invalid syntax
Input: ' in 17
| employee = Emplyee( | ||
| emp_id=row['employee_id'], |
There was a problem hiding this comment.
suggested comment: SyntaxError: expected class or def statement
Input in 32
| emp_id=row['employee_id'], | ||
| name=row['name'], |
There was a problem hiding this comment.
suggested comment: employee_id=row['employee_id in 33
| def main(): | ||
| input_file = 'employees.csv' |
There was a problem hiding this comment.
suggested comment: SyntaxError: invalid syntax
Input: print(" in 47
| input_file = 'employees.csv' | ||
| output_file = 'employees.json' |
There was a problem hiding this comment.
suggested comment:
Input: output_file = 'employees. in 48
| output_file = 'employees.json' | ||
|
|
There was a problem hiding this comment.
suggested comment: output_file = 'employees.csv'
in 49
| employees = read_employees_from_csv(input_file) | ||
| for employee in employees: |
There was a problem hiding this comment.
suggested comment: employees = read_employees_from_csv in 52
| save_employees_to_json(employees, output_file) | ||
| print(f"Employee data has been saved to {output_file}") |
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented block in 55
| print(f"Employee data has been saved to {output_file}") | ||
| except Exception as e: |
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented block in 56
| print(f"An error occurred: {e}") | ||
|
|
There was a problem hiding this comment.
suggested comment: IndentationError: expected an indented in 58
No description provided.