Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

On its surface discover violations looks just like 11st weather violations. However, there are three important differences. First of all, discover violations prints out

image text in transcribed

On its surface discover violations looks just like 11st weather violations. However, there are three important differences. First of all, discover violations prints out the number of violations found to the screen. Second, if the argument output is the name of a CSV file, it writes all of the violations found to that file. Finally, if you choose to do any of the optional activities, discover_violations will eventually include the violations found there as well. Writing the CSV file is easy; there is a function for that in utils. When writing the code for the print statements, pay close attention to the specification. Remember the period. Notice what to do if no violations are found. And remember to use the singular "violation" if only one violation is found. Implement this function as specified and run the test script. If you have done everything correctly, you should see the following: Testing module app (this may take a while) app.discover_violations passed all tests Check the Function You may run this test multiple times (but run the test script first). This will take a while! Check It! LAST RUN on 5/29/2023, 11:25:22 AM The call discover_violations ('directory', None) crashed. Traceback (most recent call last): File "/home/codio/workspace/.guides/tests/step4/verifier.py", line 443, in grade funci func(fpath, None) File "/home/codio/workspace/auditor/app.py", line 88, in discover violations with open(output, 'w', newline='') as file: File "/home/codio/workspace/.guides/tests/step4/modlib.py", line 246, in open result open(file, mode, buffering, encoding, errors, newline, closefd, opener) TypeError: expected str, bytes or os.PathLike object, not NoneType

Step by Step Solution

There are 3 Steps involved in it

Step: 1

It appears that theres an issue with the output parameter being handed as None whilst ca... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Operating System questions