On its surface discover violations looks just like 11st weather violations. However, there are three important...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
It appears that theres an issue with the output parameter being handed as None whilst ca... View the full answer
Related Book For
Posted Date:
Students also viewed these operating system questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Python and most Python libraries are free to download or use, though many users use Python through a paid service. Paid services help IT organizations manage the risks associated with the use of...
-
The following table describes a randomized trial comparing an experimental medication to a placebo for treatment of reflux. Experimental Treatment Placebo (n = 100) Patient Characteristics (n = 100)...
-
Using the following data from Kalel Corporation's financial statements, compute the receivable turnover and the days' sales uncollected: Current Assets Cash .................................... $...
-
Fill in the blanks with an appropriate word, phrase, or symbol(s). Two circuits are equivalent if they have equivalent _________ statements.
-
Pick a product like Cadillac or Sara Lee Deli products or service like Mr. Clean Performance Car Wash or a car and home insurance company that is offered in a limited number of countries. Assess the...
-
The supervisor at the Precision Machine Shop wants to determine the staffing policy that minimizes total operating costs. The average arrival rate at the tool crib, where tools are dispensed to the...
-
Each of the following actions, except for one, is considered subversion. Which of these answers is not a form of subversion? Reproducing exam material without authorization. Bringing a calculator...
-
Wallet Structure and Controls Vertical 1. Please match your organizational structure for implementing your strategy for multi-national business. differentiation Horizontal differentiation Need for...
-
To what extent are leaders ready to be taught within their work setting? In light of the aforementioned, I identify five main questions based on which contemporary organizations can work in order to...
-
Give an example of a company that needs to center purpose as a matter of urgency.
-
What strategies can organizations put in place to minimize the harm caused by dark leaders?
-
What mechanisms could be used to examine the role of leadership practice in community engagement and social change?
-
What is AI, and why is AI a disruptive technology?
-
What is the critical path for the project described by this table? A. C-F B. A-D-G C. B-E-G D. A-B-C Activity Immediate Predecessor(s) A B D E F G A B D, E Te 5 2 3 7.5 6.5 8 5 VAR 0.444 0.111...
-
A 6-lb shell moving with a velocity ?? v0k explodes at point D into three fragments which hit the vertical wall at the points indicated. Fragments A, B, and C hit the wall 0.010 s, 0.018 s, and 0.012...
-
Shows the temperatureconversion trajectory for a train of reactors with interstage heating. Now consider replacing the interstage heating with injection of the feed stream in three equal portions, as...
-
Go to the Chapter 2 Video Screencasts Web page (http://www.umich.edu/~elements/6e/02chap/learn-cheme-videos.html). 1. View one or more of the screencast 5- to 6-minute videos and write a two-sentence...
-
Go to the Web site (http://www.umich.edu/~elements/6e/09chap/iclicker_ch9_q1.html) and view at least five i>clicker questions. Choose one that could be used as is, or a variation thereof, to be...
-
The following are the financial statements for Nailsea plc for the years ended 30 June 2020 and 2021 There were no disposals of non-current assets in either year. Dividends were paid in 2020 and 2021...
-
The statements of financial position of Axis plc as at 31 December 2020 and 2021 and the income statement for the year ended 31 December 2021 were as follows: 1 During the year, plant (a non-current...
-
Consider the following: 1 A motor car manufacturer offers a three-year warranty on all cars that it produces. The warranty undertakes to make good any defects arising from the manufacturing process....
Study smarter with the SolutionInn App