Python Section 8-Modules: AttributeError

Hello,

I am currently on Section 8 (modules) of the Python course. I was following along on the code that Mosh has written, but mine shows that I have an error. The error remained after I watched all the videos in the section, so I reverted it back to one of the earlier codes so that I could more easily find the problem. However, I could not fix it, could someone take a look for me?

The problem:
Even though I defined the attributes “calc_tax” and “calc_shipping”, my code tells me that the module does not have these two, thus showing an AttributeError. I am kind of confused about what is wrong, as I thought that I had followed exactly along to the videos. I attached a few images of my work:


(sorry for the blurry picture, I couldn’t add more than one to the post :sweat_smile:; if anyone needs a clearer picture I can send one through the replies)

Thank you :smiley:

Good day, I wasn’t able to recreate your issue. From the images you posted it seems that “sales.py” is not saved. Give that a shot and let me know if you have any further issues.

I have attached my attempt bellow. Let me know if its correct as the images where blurry.

Thank you so much! I see. I realized that I saved app.py but not the sales file. Thank you for your help!

1 Like