Question: I tried to set up error message in read_file but the expected output does not recognize my coding. Could you help me to solve it?





I tried to set up error message in read_file but the expected output does not recognize my coding.
Could you help me to solve it?
3.1 Starting the script using the command line, with invalid path arguments, shall result in the error message being printed Case insensitive i Ignore trailing whitespace i Ignore all whitespace i Substring i Regex i 1. Traceback (most recent call last): 2. .File. "Lab3_1.py", line.64, in. 3. ..main() 4. "File. "Lab3_1.py", line.55, in main 5. ...dictionary1 = read_file (arg1) 6. .File."Lab3_1.py", line.23, in read_file 7. ..raise era 8. .File "Lab3_1.py", line.18, in read_file 9. ...with open(filename, ' rb ) as file: 10. FileNotfoundError: [Errno.2] No such.file.or directory: 'not_valid.bin' 3.1 Starting the script using the command line, with invalid path arguments, shall result in the error message being printed Case insensitive i Ignore trailing whitespace i Ignore all whitespace i Substring i Regex i 1. Traceback (most recent call last): 2. .File. "Lab3_1.py", line.64, in. 3. ..main() 4. "File. "Lab3_1.py", line.55, in main 5. ...dictionary1 = read_file (arg1) 6. .File."Lab3_1.py", line.23, in read_file 7. ..raise era 8. .File "Lab3_1.py", line.18, in read_file 9. ...with open(filename, ' rb ) as file: 10. FileNotfoundError: [Errno.2] No such.file.or directory: 'not_valid.bin
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
