Module 1 print_directory_substructure

while using tree command according to Milestone 4, when i run the script locally then the output is correct, but when i submit it for assement then according to unitTesting report it is only printing the other two directories i.e. backup and transfer, it is not printing the structure for log folder inside QBox directory.

Please guide me, i have already spent around 2 hrs in finding this.

Tell me if i can attach the unitTesting report file if it is not against the community guidelines.

This is weird,
Did u delete the two folders before commit and push?

It is because you are in the wrong directory or better to say that you are not properly using address to change directory.
Please go through the description carefully

@sammynerd open print_ and read the first task and third task again ,you have to do everything you did in the terminal in the file… i had the same solved.

Do we have to delete the two folders Everytime or just before the testing

I am in the QBox directory which I think is correct

I didn’t get what you are saying, obviously I am doing it in the file

I was also stuck there and after many deletion and reading log files. This worked for me check your paths and directories. And read the guide lines in bottom of every milestone.

May be you have deleted the file ‘logs’ somehow, while removing other two files… Goto. File->OpenFolder->workspace->QBox and check if the log file is present or not. If it is not present go back to your task 1 and pull the file again. After that just confirm that ‘logs’ is present under QBox.

Go through your commands and check you are not deleting ‘logs’ file.

no i am not deleting logs file, it is still there

  1. You have to delete the files everytime before you run your as you cannot create files again which are already present)
  2. When you push your code and assessment starts it actually executes in its own directory(which we don’t know and don’t need to know) so we have to write code in such that it can execute regardless of the directory in which it is present(it is also stated in the task board description area). You have to improve the directory changing lines.

thanks a lot bro
The mistake i was doing for selecting path:-
i was doing in accessing home directory
which it should be accessed like cd ~/
because it will be same for every user.


Yeah ! You got it right @sammynerd ! Happy Learning

Thanks a bunch, I was doing the same

1 Like

Point that was helpful for me is :
Just think that this is 2nd test case and we have to manage script of this test case so that we can run rest 2 test cases after it correctly.
& Log files are great help this time.

hey,i am getting same error ,can u explain how did you solved your error

you just have to be CAREFUL while writing paths for changing directories because the structure or folders names can be different for the Unit Testing.
for accessing the home directory correct way is cd ~/remaining_path i.e. after this ‘~’ symbol because it is same for every user. tell me if you don’t get it.

do we need to write all those command like making directory and copying file to directory in the file??

I was getting the same error. Solved it, finally.

1 Like