Ex51 from lpthw

in ex51 from lpthw, i have typed all files as instructed. whenever i am running nosetests it throws following error as shown in screenshot.

now i didn’t really get the hierarchy of various files to be maintained. i have attached the tree structure in next screenshot. please review the case and let me know the correct file hierarchy.

help is appreciated.
thank you.

Screenshot from 2020-06-03 17-36-26 Screenshot from 2020-06-03 17-33-59

If you look at the skeleton folder and your gothonweb folder there are a few differences. Most noticeable the dunder inits. Python needs these to know a folder is a package.

Yes, do you see how you have __init__.py files in the wrong places compared to skeleton? Also, you might need to do this:

export PYTHONPATH=.

That’s not supposed to be needed but apparently it still is.

thank you gpkesley and zedshaw very much. i managed to work around and run the nosetests successfully.

but the major problem was in app.py module.

i had missed to change the following:

index.html ==> index_laid_out.html
hello_form.html ==> hello_form_laid_out.html
(lines 15 and line 17 in the app.py sreenshot)

the ss of tree gothonweb is also attached as it would be helpful.

thank you.

Screenshot from 2020-06-04 15-02-56
Screenshot from 2020-06-04 14-54-57

2 Likes