CS50 Finance | CS 50 Week 9 Problem Set Finance | Beginners Guide to PSET 9 2024

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • 00:00 Intro, 01:48 Register, 06:11 Quote, 07:47 Buy, 10:35 SQL Update, 12:22 Index, 15:58 Sell, 19:07 History
    Welcome to This is CS50 Week 9 Problem Set - Finance. This tutorial will cover how to complete CS50x Finance.
    Don't forget to export API_KEY=value where "value" is your exact APK key starting with pk_. this is run from terminal $.
    Then cd finance. You'll need 'flask run' and Ctrl+C will stop flask from running.
    sqlite3 finance.db to alter SQL and .exit to return to /finance then back in to flask run.
    Happy Watching!
    NOTE! - to PASS the CS50 check, you NEED to implement the logic I left out in the def index portion of the app.py - you MUST have shares and totals down to two decimal points to clear the check. You may want to use the 'usd' function and or some 'float' logic. There are also other ways to solve this. Good Luck!

Komentáře • 673

  • @RealisticResponse
    @RealisticResponse  Před rokem +39

    Critical UPDATE: The BUY function EXPLICITLY wants a "button" despite the form being in working order, you need to update the code as follows on buy.html (this is a modification only to the last line that turns the from click into a button to satisfy:
    Buy

    Shares:


    Symbol:


    Submit

    • @lpdemodimi
      @lpdemodimi Před 6 měsíci +2

      The issue with buttons actually now applies to all buttons in Buy, sell and quote.
      Just use for every button or check50 will turn red (tested in 2024)
      Crucial here is the type="submit", which the html seems to be tested/scanned for.

    • @RealisticResponse
      @RealisticResponse  Před 6 měsíci

      @@lpdemodimi I love this quote - I haven't gotten the update for 2024 yet so THANK YOU for noting this!

    • @ayaanlalani8227
      @ayaanlalani8227 Před 5 měsíci

      @@lpdemodimi hey I've done this but it's still showing me "expected button to submit form, but none was found."

    • @chaitanyadubakula
      @chaitanyadubakula Před 3 měsíci +3

      :( buy handles valid purchase
      expected to find "112.00" in page, but it wasn't found
      I'm having this problem even though I got the right text to appear in a flash message and the button to work.

    • @Sharveshaa
      @Sharveshaa Před 3 měsíci

      @@chaitanyadubakula same, even im getting it. did u figure out how to solve it?

  • @sanacuriosidad
    @sanacuriosidad Před 7 měsíci +39

    People having issues with the 2024 version,: there is a note for the index. The lookup function no longer returns a "name". Just delete ( stock["name"] = quote["name"]) from the code and also from the html table. Thanks Devin for all your great tutorials.

    • @RealisticResponse
      @RealisticResponse  Před 7 měsíci +1

      I love this comment! I Hope everyone is reading this. thank you!!!

    • @aristzampaftis6828
      @aristzampaftis6828 Před 6 měsíci +1

      I do not understand how it should be now implemented. Can you please help?
      My previous code was like this:
      for stock in stocks:
      quote = lookup(stock["symbol"])
      stock["price"] = quote["price"]
      stock["total"] = stock["price"] * stock["shares"]
      total_price += stock["total"]

    • @RealisticResponse
      @RealisticResponse  Před 6 měsíci

      @@aristzampaftis6828 gonna have to hop in discord and be patient but I'll help you figure this out: discord.gg/GeTqTCHA

    • @airsoftsh
      @airsoftsh Před 3 měsíci +2

      NOTE: taking this line out means that the colspan="4" NEEDS to be colspan="3" in BOTH spots, otherwise the check50 will give an error

    • @RealisticResponse
      @RealisticResponse  Před 3 měsíci

      @@aristzampaftis6828 I need to know what error your getting - new discord link is:
      discord.gg/YPsWnFWW
      good for 7 days

  • @bookwormd8627
    @bookwormd8627 Před 9 měsíci +15

    You are a literal godsend... I struggled so much with this problem set, like panic attack level and finding this video stopped me from giving up my entire 6 months journey. I cannot put into words how grateful I am that you chose to upload this video to help the thousands of people who like me struggled. I'm sure you already know from the hundreds of people thanking you that you are appreciated, but truly, thank you! On to final project!!!!!

    • @alialdalate4225
      @alialdalate4225 Před 9 měsíci +2

      could you submit it bro? the code is working?

    • @josiahking2772
      @josiahking2772 Před 9 měsíci +2

      Yo my whole project is working perfectly fine bruv did it all by myself but when I do check50 im getting an error on the buy page stating "buy handles valid purchase
      expected to find "112.00" in page, but it wasn't found" do you perhaps have a solution for this bruv???

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci +1

      My pleasure! Thanks so much for the support! I'm so happy I was able to help! Appreciate you sticking with it till you found me an congrats on completing this!

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      @@alialdalate4225 respond to my comments no les than weekly - code still works - update video to prove it - you're good - just stick to it!

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci +1

      @@josiahking2772 This question is answered in the video 3 times, i put it in the description, and I've answered it on MANY comments - trust me that the answer you're looking for is MUCH simpler than you think but if you read other comments, I promise you'll get there.

  • @hi_eklavya
    @hi_eklavya Před 10 měsíci +9

    I love how you are replying to every single person who has doubt even after 5 months of posting this video this is really great. I appreciate your efforts. Thank you so much for your work and dedication.

    • @RealisticResponse
      @RealisticResponse  Před 10 měsíci +7

      Lol coding as a beginner isn't easy. Some people just need reassuring. Thanks so much for the support! I really appreciate comments like this!

  • @cricfever_30
    @cricfever_30 Před měsícem +3

    I am getting error. I have written this entire code for months, but I am getting an error from the api key. Please tell me sir how I add an api key??

  • @rezamakvandi7404
    @rezamakvandi7404 Před rokem +11

    thanks Devin. longest 22 minutes of my life 😀

    • @RealisticResponse
      @RealisticResponse  Před rokem +2

      I feel you - making this one was..... intense. Not the code (which wasnt fun) but the video - cutting out all the repeats and trying to trim it down. I did my best but MAN was it a big one. Congrats making it to the end!

  • @ut_fan8787
    @ut_fan8787 Před 11 měsíci +8

    Late, but was CRYING and having a full on mental breakdown because I couldn't solve this and all the other tutorials took hours but didn't work. Then... A MIRACLE HAPPENED! I found this video and finished the pset in an HOUR and I am crying tears of joy THANK YOU SO MUCH FOR ENDING MY SUFFERING

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci +1

    • @gusgtzbg6387
      @gusgtzbg6387 Před 11 měsíci +3

      Allah Akbar 🙏

    • @Luci_19
      @Luci_19 Před 8 měsíci

      Hey, I'm stuck on the sql part it keeps leaving at this ...> can you if don't mind help me out please?

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      @@Luci_19 make sure you first
      cd finance
      then
      sqlite3 finance.db
      then execute your command. Dont forget to get into the sql file first before updating anything in terminal

    • @CircleOfTheRighteous
      @CircleOfTheRighteous Před 8 měsíci

      make sure you end SQL commands with a semi colon;@@Luci_19

  • @nicholaslydon7089
    @nicholaslydon7089 Před 4 měsíci +4

    Bro you are a LIFE saver. Had most of it, but couldn't find how to reference the session's user_id for the life of me. Thank you!

    • @RealisticResponse
      @RealisticResponse  Před 3 měsíci

      Happy to help! good job making it this far!

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

    • @azizaaltyyeva5046
      @azizaaltyyeva5046 Před 6 dny

      are you doing pset9 2024? did the code work for you?

  • @BSIAB
    @BSIAB Před rokem +8

    Thank you! This was really helpful. It makes a hard an frustrating problem a good learning tool, there is a lot to learn by going through your video and the completed project. Once again thank you and congratulations for being a person that shares knowledge and helps others.

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci +1

      Hi! Helping others is a big deal for me. I'm so grateful for each comment and person out there letting me know I'm helping so thanks so much for the feedback!

  • @AnujKumarSharma-vh7pk
    @AnujKumarSharma-vh7pk Před 8 měsíci +3

    Great Video Brother!!!
    Thanks to you i am moving to final Project ,
    Thank youuu!!!!!
    Keep this good work continue you will definitely Grow ❤❤❤❤

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci +2

      All you my friend! Congrats on completing this! Happy I was here to be a part of this with you!

  • @daniellouis6665
    @daniellouis6665 Před 8 měsíci +1

    It does indeed work. As for the part he tells you to do on your own, he drops a lot of hints. Thanks Devin.

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      You are the BEST! well done and congrats! Hopefully I'll have more helpful stuff this coming year!

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

  • @Redpilllllll
    @Redpilllllll Před 6 měsíci +2

    Helped me out a TONNNNNN!!!!! Didn't officially enroll in cs50 but was using the entire course as a primer for my enrolled Comp Sci courses next month-I think all of this will lay an awesome foundation, and Devin I cannot quite frankly thank you enough for all of this. Smoothed out the major bumps in the road through a lot of the differing projects when I got stuck, and this last project was an absolute beast that would have taken me way WAY longer without your help. THank you so much my man

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      I'm sorry to be so late to such a nice comment. I can't tell you how much I appreciate you letting me know that I've helped you. I'm glad you're done and hopefully, as I grow this channel, I can continue to contribute to your growth as a coder. Keep up the great work and thanks again!

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

  • @BijouBakson
    @BijouBakson Před 11 měsíci +1

    Submission criterias are so strict that even when the app is working as it should, there's still :( marks. Your work has certainly helped me as it's provided the reference I've needed.
    By the way, the proper way is to create a stock table and a separately transactions table. At every transaction you add stock AND update transactions accordingly. You return the content of the transaction table to /history table, and that of stock table to the root folder table, accordingly. This allows for purchase of the same stock many times at different values.
    As I stated above, your work was instrumental to help me move at critical stages. You are appreciated. Thank you.

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci +1

      In the video I mention 3 times that the money isn't formatted. And it's in the description as well. I did this on purpose because I want the user to find and update these things accordingly. This was a very simple task (as you noticed) so I wanted to make sure people could identify this error, and update it on their own.

    • @BijouBakson
      @BijouBakson Před 11 měsíci

      Oh okay! I get you now. Did not really watch the video, I just went to a section that puzzled me. Now I edited the comment accordingly@@RealisticResponse

  • @bernardokawano
    @bernardokawano Před 8 měsíci +1

    You are an angel and I wish all the best for you and your family. Keep up the great work and helping people, you are an incredible person, congratulations.💟

  • @dogshithandle111
    @dogshithandle111 Před rokem +3

    This helped me greatly. I really do not enjoy the front end aspect of programming and I struggle with it alot. I'm starting my final project and will be done soon. Again, thank you very much for the effort!

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Hey! i'm excited I was able to help. Keep us posted on your final! Love to know what people are doing!

  • @brunopereira4643
    @brunopereira4643 Před 4 měsíci +1

    Thanks man, your video helps a lot, I just saw the code to clarify some things, borrow ideas and do things that I was doing in 3 or more lines, just to review the logic to do it in one. This is for real a tough one as you said, but it's Cs50, we all know how difficult this course is. I think that despite making the codes work throughout the course, what bothers me most was making the code pass the test, I know that some tests are very useful, but in other cases the lines simply work but the tests go wrong, and you don't even knows where to look for this error, and in which case it is giving an error, even with the help of the course's AI. Anyway, thanks again.

    • @RealisticResponse
      @RealisticResponse  Před 3 měsíci

      You're not wrong. I've made a few functional codes myself and they didn't "pass" CS50 algo. But I just kept re-working the code until something happened. Good work getting this far and 'hopefully' completing.

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

    • @scarlet_208
      @scarlet_208 Před 10 dny

      Hello , I am facing an internal server error here in register can you please help I followed all the steps yet it' keeps showing error

  • @ligachiga1
    @ligachiga1 Před rokem +3

    Really though thanks for the video this is super helpful and Encouraging, I finished the lab then came to this one and was like "WUT"

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      This one is TOUGH dont feel bad. I see now why there's so few video helps for the whole course but this one especially. Good job making it through. Good luck on your project!

  • @thebass2798
    @thebass2798 Před 8 měsíci +1

    Dude you have been such a huge help and inspiration while i was taking this course. This video helps clear up a lot of things for me.

    • @khushiiyengar1424
      @khushiiyengar1424 Před 8 měsíci +1

      On to your final project I suppose?

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      Sorry for the delay - been away - but coming back to comments like these make all the difference in the world. I appreciate my subscribers and commenters and supporters more than they know - I'm glad I was able to help you out.

  • @reignofelohim
    @reignofelohim Před rokem +1

    Great solution, before this vid I was stuck with an error 302 instead of status code 200. This pset was TOUGH. Thanks for the help.

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Absolutely! Thanks for the shout out! This one wasn't easy but I'm glad you got through it! good job!

  • @garbsonsouza2c876
    @garbsonsouza2c876 Před rokem +3

    hello friend, I'm sorry for not expressing myself well, I would never diminish your work, on the contrary I am very grateful for your help, without it I would not have been able to finish the course, thank you very much

    • @RealisticResponse
      @RealisticResponse  Před rokem +3

      I didn't think you were being disrespectful. I'm happy to help and will do whatever I can. This small thing was just more than i was or am able without a whole other video.
      I'm happy to help and happy to see you're completing the course! Thanks so much and dont worry. I'm here to help.

  • @Djxkhxhkxkgxiyxkb
    @Djxkhxhkxkgxiyxkb Před rokem +1

    Thank you so much brother I appreciate you and your help, I have been struggling with this problem set until I found your account ✨
    I am watching your videos from KSA 🇸🇦

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Thanks! So happy I could help! I'm on to CS50W now and then after that I think maybe the MIT course but we'll see where the road takes us!

  • @khushiiyengar1424
    @khushiiyengar1424 Před 8 měsíci +1

    I am so thankful for you. Today i will be submitting my final project and all thanks to you. This journey would have been impossible without your help. This pset was the most toughest but with your help i was able to do it. You're godsend

    • @achrafahlabbane849
      @achrafahlabbane849 Před 8 měsíci

      Hello man iam too but I still have a problem I fnace it doesn't wana work

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      Congrats! I'm Happy for you! we all need a little help sometimes. Happy i was able to be part of your journey!

  • @nicolasvallejos2017
    @nicolasvallejos2017 Před 3 měsíci +1

    Thank u for all of the help that u provided. Love the content and information. Hugs from Argentina

  • @tadiwa2k11
    @tadiwa2k11 Před 22 dny +1

    Such a legend for this, i was starting to get demotivated because I wasn't confident in my logic, but using your guide to proof check what I was doing helped alot with that. Your explanations made it so easy for me to understand what i was doing.

    • @RealisticResponse
      @RealisticResponse  Před 20 dny +1

      Can tell you how much this means to me. I keep getting downhearted since making these. Not all of the feedback is positive and it gets tough trying to help people all over the world. But comments like this definitely keep me motivated. I appreciate you, and congratulations on making it this far!

    • @omarhoque1662
      @omarhoque1662 Před 20 dny +1

      brother, can you tell me what he meant in 10:50 , how do I add the codes in the sql file? I wrote the codes in a seperate .sql file and kept it inside finance folder , then i went to sqlite3 and now what?

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      @@omarhoque1662 I wrote a response on your other comment - hopefully it helps. but get into your sql file b entering the command sqlit3.db to enter the existing sql database (recall sql week and manipulation).

  • @artaround5717
    @artaround5717 Před rokem +1

    Bro, haven't seen you in a couple of months since ps6 I guess. Thank you for making the code scale larger, the content is perceived in a completely different way.

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      My pleasure. Onnupdated videos when they come you should see improved visual and sound. Also for future courses. I appreciate the feedback and want to make sure these videos are helping . Glad to see you made it back around! Congrats on making it to the end.

    • @artaround5717
      @artaround5717 Před rokem

      @@RealisticResponse Thanks Devin. It's been a long journey.

  • @caiomac1
    @caiomac1 Před rokem +2

    Nice video, bro! Thanks for the support, without these type of videos, we can't finish the course... :/

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      The course is difficult for true beginners I hope that these helped you understand better. Always good to re look at what you've done. The second time around is super helpful now that you have the know how. This is all about practice and redundancy. Good work!

    • @caiomac1
      @caiomac1 Před rokem +1

      ​@@RealisticResponse Yeah, totally agree. I'm on the first month studying computer science and I have to say that it was very difficult to me to understand all the stuff. Your videos helped a lot of people around the world, thanks! Hugs from Brazil!

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      @@caiomac1 man that's hugely appreciated! Thank you so much! Coding is all about working together. The internet was LITERALLY invented to advance science thanks to Tim Berners Lee. I'm for it and I'm here to help. Great job and keep up the good work!

  • @dh4rkx634
    @dh4rkx634 Před 8 měsíci +1

    I had this pset going well up until buy where everything got messy for me, but your explanation of how it works helped me a ton. thank you!

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      Glad I was able to be a part of your success! Congratulations!

  • @mondasoliman4171
    @mondasoliman4171 Před 11 dny +1

    Can y help me please it give me this bugs
    :( buy handles fractional, negative, and non-numeric shares
    application raised an exception (see the log for more details)
    :( buy handles valid purchase
    expected to find "112.00" in page, but it wasn't found
    :| sell page has all required elements
    can't check until a frown turns upside down
    :| sell handles invalid number of shares
    can't check until a frown turns upside down
    :| sell handles valid sale
    can't check until a frown turns upside down
    :| history page shows transactions
    can't check until a frown turns upside down

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      This is answered in many many comments and referenced 4 times in the video. Please see other comments that will help solve this.

  • @barcode_artist
    @barcode_artist Před rokem +1

    That one actually get to me pretty easy, even that I struggle at the more earliest psets...

    • @RealisticResponse
      @RealisticResponse  Před rokem +2

      That's great! This is a tough PSet that shows excellent growth that it's not difficult for you. Well done!

  • @inferno66629
    @inferno66629 Před 4 měsíci +1

    thank you so much for the great help!!!! And your logic is crystal clear , admire you!! hope you all the best !!!

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      Thanks so Much! Just getting back at it after a break and hope to bring you lots more helpful information! Appreciate you!

  • @PatrickDucat
    @PatrickDucat Před 2 měsíci +1

    Not sure if anyone caught this yet but a critical piece you didn't note in your sell section is the number if shares should be a negative value 17:21 . This is in your code but not mentioned and easily missed. Thanks for the video.

    • @RealisticResponse
      @RealisticResponse  Před měsícem +1

      You're a gem. This video was several days of editing. I appreciate the feedback and looking out for others. There was bound to be a thing or two i missed so thank you for helping and supporting others.

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

  • @Nataliia_9
    @Nataliia_9 Před 6 měsíci +1

    Thank you very much for your hard work! I have learned so much and finally understood everything!

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      Thanks so much for the support hearing that you understand is invaluable. Appreciate you so much and congrats!

  • @eyadedsm7834
    @eyadedsm7834 Před rokem +3

    Hello brother, thank you for your efforts and I hope you will re-explain this problem because cs50 has updated it🙏

    • @RealisticResponse
      @RealisticResponse  Před rokem +2

      There's already an updated video. The changes to CS 50 do not affect the code. the code in this video is correct. Please feel free to watch the short video regarding the update.

  • @ercarltz2737
    @ercarltz2737 Před 17 dny +1

    I have a problem with the API key. The register page of IEX cloud simply dont load!!!

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      I dont think 2024 is requiring the api key - can you tell me abit more?

  • @faariswheel5673
    @faariswheel5673 Před 2 měsíci +1

    Whenever I click the sell button I am getting Internal Server error. In the terminal it says TypeError: The view function for sell did not return a valid response. The function either returned None or ended without a return statement. Any ideas on what the problem is?

  • @meera.srivastava
    @meera.srivastava Před měsícem +1

    I WAS STUCK ON THIS PSET FOR FOREVERRR. THANK YOU SO MUCH FOR THIS QUALITY CONTENT!! only suggestion would be to make a detailed video with deeper explanations if possible! that’s something that would help me soo so much to understand why we write certain code. ALSO, for those of you getting the :( on buy handles valid purchase, make sure to test this only after you have formatted the price to match the criteria (2 d.p.)! A hint for this is that you need to use the format function on your index.html!

    • @RealisticResponse
      @RealisticResponse  Před měsícem +1

      Since we're already in August, I'm waiting for the 2025 drop and plan to re-do the WHOLE course with better quality. I've improved my PC, My Mic, My Camera, all of it - hoping to do some better, deeper dives to help more people but THANK YOU for you're early support and comments!!!

    • @cricfever_30
      @cricfever_30 Před měsícem +1

      I need help related to finance project please reply me 🙏

    • @meera.srivastava
      @meera.srivastava Před měsícem +1

      @@cricfever_30 hey, i could try helping! what’s the issue!

    • @cricfever_30
      @cricfever_30 Před měsícem

      @@meera.srivastava bro send me your instgram I'd there we discuss, because I continue to get an error that's a reason. Please reply

    • @RealisticResponse
      @RealisticResponse  Před 20 dny

      @@cricfever_30 how can i help?

  • @omarhoque1662
    @omarhoque1662 Před 20 dny +2

    didnt understand what 10:50 was meaning , how do I add the codes in the sql file? I wrote the codes in a seperate .sql file and kept it inside finance folder , then i went to sqlite3 and now what? ( i think this is a rookie question but im working on this for 3 hours now)

    • @lgachaboyyt
      @lgachaboyyt Před 19 dny

      Sqlite3 finance.db in terminal

    • @omarhoque1662
      @omarhoque1662 Před 19 dny +1

      @lgachaboyyt the code that he shows in text file...do i keep that code in a .sql file inside finance folder? I did that but it didnt work

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      @@omarhoque1662 Hopefully everyone here is a bit of a rookie. In case you haven't figured this out yet - watch at 10:45.
      You have to enter the slite3.db command to get 'into' your sql file (recall your sql week). then enter the code to update sql, then back out of sql to get back into our regular file.
      You shouldn't be writing a new sql fie - there's already one there - having 2 can be problematic.

  • @RayleSwift
    @RayleSwift Před 18 dny +1

    hello, thankyou for the video --> im a bit confused about the "index section" its showing error expected to find 112.00 something...... can you clarifify what to do to convert the number into USD? timestamp: 15:45

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      All values need to be in USD format. I have to re-do this video explaining this since it's the Number 1 asked question. There should be lots of help here in the comments section since that one gets asked a lot. Hopefully previous comments can point you in the right direction.

  • @patrickfaudap7216
    @patrickfaudap7216 Před 11 měsíci +2

    here are the errors I encounter after running your code : :( buy handles valid purchase
    expected to find "9,888.00" in page, but it wasn't found
    :| sell page has all required elements
    can't check until a frown turns upside down
    :| sell handles invalid number of shares
    can't check until a frown turns upside down
    :| sell handles valid sale
    can't check until a frown turns upside down

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci

      Hey there! So Here's some more hints - First, in the video i mention it about 3 times. Also - in the description there's a hint.
      This error means that your totals are not in 2 decimal point formats. To fix this you need to look at your app.py and use a function (see description) to make sure that your total's are giving you the results in just 2 decimal places.
      Also look to other comments here. I've had this question the most. I knew leaving it out would cause this, but i needed to leave some things up to the user. The basics of this go back to week 2 i believe so I'm certain once you see it, it will click. Just get that updated and you'll be good to go!

    • @davidninoaguirrecampis6617
      @davidninoaguirrecampis6617 Před 9 měsíci +1

      @patrickfaudap7216 Where you able to solve the error? I have the same error and I've been trying and asking for help but no one has replied to my comment..can you help me please?

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      @@davidninoaguirrecampis6617 You replied to his comment but didn't read the comment I told him on how to solve it. There are dozens of answers I have here helping people solve this same problem. I recommend reading my replies and that might help you understand.

  • @marlowsamuel4467
    @marlowsamuel4467 Před měsícem +1

    Why you don't show us the hole code only some parts
    And i have a question how can i make the flask for all them

    • @RealisticResponse
      @RealisticResponse  Před 20 dny +1

      I don't show the whole code because people would come to this video to copy and paste. My channel is designed in a way to not make me feel like I'm helping people cheat, but helping them learn. That's the only reason I don't post the whole code as it would be like posting a solution. Hope that makes sense.
      As for your question, when you run flask it should run for all of hem if they're properly linked and you're in the correct directory. Perhaps I'm misunderstanding the question?

  • @jessipresten9042
    @jessipresten9042 Před 9 měsíci +1

    This one hurt! Thank you for your help:)

  • @segidemir9491
    @segidemir9491 Před 8 měsíci +2

    Hello, when I check, it keeps ask "buy say handles valid purchase expected to find "112.00" in page, but was't found? How can I solve this

    • @mario050488
      @mario050488 Před 8 měsíci +1

      I have the same problem. Do you know how to solve it? Is it becuase of the decimals?

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      I talk about this 3 times in the video and there's hints in the description and I've answered it dozens of times in the comments Please look to previous comments for help - it's a very simple addition to the code that you need. Please have a look around to see if any of the other previous comments or description help.

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      @@mario050488 I talk about this 3 times in the video and there's hints in the description and I've answered it dozens of times in the comments Please look to previous comments for help - it's a very simple addition to the code that you need. Please have a look around to see if any of the other previous comments or description help.

  • @user-ei5fw9zv5o
    @user-ei5fw9zv5o Před 4 měsíci +2

    print("Thank you Thank you Thank you Thank you!"*10000)😍

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci +1

      thank YOU - appreciate your support! keep up the great work!

    • @cricfever_30
      @cricfever_30 Před měsícem

      ​@@RealisticResponseI need help related to finance project please reply me 🙏

  • @xsenyus7521
    @xsenyus7521 Před 16 dny +1

    hey so I have a problem. when i run check 50 this frowns:
    :( buy handles valid purchase
    expected to find "112.00" in page, but it wasn't found.
    do you know what that means?

    • @xsenyus7521
      @xsenyus7521 Před 16 dny +1

      oh wait check50 is different from when you did it with your other video. hmmm.

    • @dorakonn8799
      @dorakonn8799 Před 14 dny +1

      Did you solve the issue? I am struggling the same error((

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      ​@@xsenyus7521 it is a bit different but the issue is the same. This comment is the number one question and there are lots of responses and comments that help solve it. I also mention this 4 times in the video. All values must be usd which is defined in the existing code. If you convert all values to usd this should solve your problem.
      If that doesnt make sense, look to previous comments as we've solved it many times. That should help.

  • @user-gh5bl6lc3d
    @user-gh5bl6lc3d Před 8 měsíci +2

    Hey Devin..!! its been over a week I'm working on finance but getting errors in sell function. some are those errors which I can't understand where I screwed up, when I execute check50 it even can't check any function.

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      Hey there, you're not giving me anything to go off of here. I understand something is broken but you're kind of just telling me nothing is working. I can't really evaluate the depth of the issue. This should have take a while, over a week isn't uncommon - but you should have been testing at every stage and every html extension. if you did this then we can identify the error. or if you have an error message... but telling me nothing works is the same as telling me 'i have no code' - i just dont have anything to imagine where the problem is or could be.

  • @user-kv9ow5hf8q
    @user-kv9ow5hf8q Před 12 dny +1

    I have submitted exactly. what you have shown in this video, yet I am receiving a score of 1/21, am I. missing something?

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      Most definitely. What happens on your check50? where are the errors? you have to find and debug. This is a very tedious project and you can't be missing anything but you should not be receiving a 1/21.

  • @KpopChickenn
    @KpopChickenn Před 13 dny +1

    what is the grand_total variable for in the index function?

    • @RealisticResponse
      @RealisticResponse  Před 9 dny

      A previous version I wrote. It doesn't serve a purpose. I was going in a different direction and left it in. but it is a dead line of code so shouldn't impact yours if you do not use. This video took so long to do, removing something I didn't end up using in the end became to tedious so it died in-line.

  • @sabinevanadrichem4644
    @sabinevanadrichem4644 Před rokem +2

    :( buy handles valid purchase
    expected to find "112.00" on the page, but it was not found. I get this from the check50 but how can I solve this?

    • @sabinevanadrichem4644
      @sabinevanadrichem4644 Před rokem

      Or this: :( buy handles valid purchase expected to find "9,88.00" in page, but it wasn't found

    • @sabinevanadrichem4644
      @sabinevanadrichem4644 Před rokem

      By check50 sell I get sell page has all required elements, sell handles invalid number of shares and sell handles valid sale but with all of these can't check until a frown upside down

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Hey Sabine! One way is to update the app.py file using float logic and USD() I mention this twice in the video as well as in the description. This part is up to you. At this point in the class if you've been following along and following with my videos you should have the know how.
      You need to get your index to return totals in 2 decimal places - how you do that is up to you but it is required for the final.

  • @PropertySourcing
    @PropertySourcing Před 2 měsíci +1

    SELL, BUY and LOGIN buttons all give me internal server error. Can someone help? :(

  • @luc_kht
    @luc_kht Před rokem +2

    Can someone please help me I've been working on the project for several hours but I can't get rid of this error code: “expected to find "9,888.00" in page, but it wasn't found”. Thank you

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      Hey there! There are dozens of comments regarding this issue and I cover it twice in the video. In your app.py you need to implement the usd or float function to get your totals on income rounded appropriately. You're very close and this is early cs50 logic. You can get there. Use one of those two logics so that your balances are rounded to 2 decimal places.

    • @luc_kht
      @luc_kht Před rokem +1

      @@RealisticResponse Thank you for the answer. Even though it's so easy, I still can't seem to figure it out. Can you please show me how to solve the problem?

    • @RealisticResponse
      @RealisticResponse  Před rokem

      @@luc_kht I can help you solve this but you have to hop in discord. I cant give you the answer but I can help get you there

  • @ErenEsinler
    @ErenEsinler Před 10 měsíci +2

    Thank you :) You are a life saver

  • @user-lc6vz4fu5y
    @user-lc6vz4fu5y Před 7 měsíci +1

    Hello Mr. Finley, is there any way that you can make a 2024 version? I tried using your code but it did not work. Thank you for your videos, I couldn't have done most of the course without you. Please consider making a 2024 version soon...

    • @RealisticResponse
      @RealisticResponse  Před 7 měsíci

      :) app.py exists
      :) application starts up
      :) register page has all required elements
      :) registering user succeeds and portfolio page is displayed
      :) registration with an empty field fails
      :) registration with password mismatch fails
      :) registration rejects duplicate username
      :) login page has all required elements
      :) logging in as registered user succceeds
      :) quote page has all required elements
      :) quote handles invalid ticker symbol
      :) quote handles blank ticker symbol
      :) quote handles valid ticker symbol
      :) buy page has all required elements
      :) buy handles invalid ticker symbol
      :) buy handles fractional, negative, and non-numeric shares
      :) buy handles valid purchase
      :) sell page has all required elements
      :) sell handles invalid number of shares
      :) sell handles valid sale
      :) history page shows transactions
      As Of 08:50AM on 27, January 2024 this code still works. although, AS MENTIONED, you need to convert to USD - the only check that has been added is for a $28.00 on history page which, as mentioned in the video, means you have to convert "price" on your history page to 2 decimals.
      This code till works.

    • @user-lc6vz4fu5y
      @user-lc6vz4fu5y Před 6 měsíci

      @@RealisticResponse Thank you, sir. I'm very grateful for your help, have a great new year

  • @Sailen_176
    @Sailen_176 Před 6 měsíci +4

    buy said symbol not found :( buy handles valid purchase
    expected to find "112.00" in page, but it wasn't found

    • @ext1nct297
      @ext1nct297 Před 4 měsíci +1

      Did you ever find a solution?Im having the same issue

    • @ext1nct297
      @ext1nct297 Před 4 měsíci +1

      nvm I found the issue. I'm sure that you have already fixed it, but for anyone struggling in the future, you need to make sure that your index uses the "usd" function. {{ stock.price | usd }}
      {{ (stock.price * stock.total_shares) | usd }}

    • @ooddddoo699
      @ooddddoo699 Před 4 měsíci

      @@ext1nct297 i have the same issue for days now...When you say "index" you mean that it needs to be displayed in usd format on the main page where index table is shown?

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      You found the hidden key! Great work @ext1nct297 well done!

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      He means the code on the index page needs to be converted to usd - I mention it several times in the video and in the description and multiple comments. convert your totals to usd and you'll be good to go

  • @anselmeatchogou
    @anselmeatchogou Před rokem +2

    Thanks for your help ! 😇

  • @tinosetiawan4974
    @tinosetiawan4974 Před 6 měsíci +1

    That was awesome explanation
    Great! Thanks Finley

  • @emp1re656
    @emp1re656 Před rokem +2

    I got one question: In the Index function what's the point in having two variables total_value and grand_total that always have the same value?

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      Ok... hear me out.... ORIGINALLY I'm a finance major. So when I was writing the code I intended to use Total Value as the total value of just the stocks; and Grand Total as the value of the stocks AND the cash balance. As you correctly pointed out, in this code,
      total_value += stock_value
      grand_total += stock_value
      They ended up being the same. And this video took so long to make that I wanted to chuck my computer out the window. So I never went back and changed them to the parameters I originally meant to use. So... I knew i'd get called out eventually... but I was in too deep. lol and i left it. But that was the original plan.

  • @rahulgagalani3390
    @rahulgagalani3390 Před rokem +2

    Hello,
    I've been trying to solve the CS50x problem since a month but I am still unable to. The only set left is this one. Is there any correct solution form where I can copy the code and learn from it. I'm really tired now.

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Hey there. I don't have a cheat sheet. This video can help you solve the issue. The code and explanation is all there. Don't feel bad if you have to take a break. But i don't have the outline as an answer sheet posted anywhere.

  • @raghadel-dieb8264
    @raghadel-dieb8264 Před 11 měsíci +1

    Finally!!! Thank you you're awesome ❤

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci

      Let's go! Check the recent video for a giveaway. Gratz making it this far!

  • @slavicakaraterzieva3257
    @slavicakaraterzieva3257 Před 6 měsíci +1

    I do have a problem with the sell function. Even though I applied the usd() function everywhere I could, I still get the error: expected to find "56.00" in page, but it wasn't found. 😔. I'm so tired of this error.

    • @RealisticResponse
      @RealisticResponse  Před 6 měsíci +1

      Check your html and app.py and make sure you've implemented the cash function - if you run your page and look, you need to get down to 2 decimal places - to do this, you have to use the cash function - there's a LOT of comments here that help answer this question. you're very close - it's honestly simple enough that when you see it you'll kick yourself at this point.

  • @jessipresten9042
    @jessipresten9042 Před 9 měsíci +2

    Hi Devin, I have all the code and checked that my sql table was updated but I am still having trouble with my buy page. Here is my error :( buy handles valid purchase
    application raised an exception (see the log for more details). Everything else is working on the site.

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci +2

      this should be in your buy function in app.py - theres something missing telling the program what to do when executing a buy - it has to do with the function that updates the sql to add a share and subtract the cost of it.

    • @joinjerrod938
      @joinjerrod938 Před 14 dny

      I'm having the same issue. How did you resolve??

  • @jou1105
    @jou1105 Před 7 měsíci +2

    Thanks Devin! you are the 🐐

    • @RealisticResponse
      @RealisticResponse  Před 7 měsíci +1

      Congrats on making it this far. Happy to help in your journey!

  • @hAmza-jn7ly
    @hAmza-jn7ly Před rokem +1

    How to fix 500 internal server error in the registration, I have index.html but still the same issue

    • @RealisticResponse
      @RealisticResponse  Před rokem

      That error is too vague. I don't know what the problem is based on that error. you're going to have to hop into discord or elaborate because the error provided doesn't give me enough information

  • @fitofficial6510
    @fitofficial6510 Před 8 měsíci +2

    Issue found, I followed the same things that you did but after selling shares, number of shares is not reducing, you did something that you haven't showed here

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      Hi there. I assure you that's not the case. The issue is in the sql command for your sell shares. I made sure not to leave anything out - I was recording my screen the entire time and content was only shortened for speed but nothing critical was left out. This code and the functions within I've tested hundreds of times. The Issue is most likely in line 259(ish) on the db execute

    • @fitofficial6510
      @fitofficial6510 Před 8 měsíci

      @@RealisticResponse brother, I solved it. By the way, after changing this line, it works: db.execute("INSERT INTO transactions (user_id, symbol, shares, price) VALUES(?, ?, ?, ?);", session["user_id"], symbol, -shares, -price)

  • @preciousadedamola8294
    @preciousadedamola8294 Před měsícem +2

    Thank you so much for your video it was helpful. I am having an issue with My login, it returned an error saying expected a 200 status code but got a 400 status code.
    What can I do

    • @fantasticearner3415
      @fantasticearner3415 Před měsícem

      Same

    • @fantasticearner3415
      @fantasticearner3415 Před měsícem

      Do you got any solution

    • @preciousadedamola8294
      @preciousadedamola8294 Před měsícem

      I also need help... been on that error for a week now

    • @RealisticResponse
      @RealisticResponse  Před měsícem

      ​@@preciousadedamola8294 this is too vague i dont know where your error is. 400 means bad request. but i'm not sure where you're getting it. this is a whole application. the 400 could be getting thrown anywhere.

    • @RealisticResponse
      @RealisticResponse  Před měsícem

      @@fantasticearner3415 ​ @preciousadedamola8294 this is too vague i dont know where your error is. 400 means bad request. but i'm not sure where you're getting it. this is a whole application. the 400 could be getting thrown anywhere.

  • @WTDTravelChannel
    @WTDTravelChannel Před rokem +1

    Please Help :) I am receiving error: :( logging in as registered user succeeds and log reason is: exception raised in application: RuntimeError: no such column: name. I tried updating sql by going through the steps you suggested with creating a new table but when I try to do that I get : Parse error: table transactions already exists
    CREATE TABLE transactions ( id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTE
    ^--- error here

    • @RealisticResponse
      @RealisticResponse  Před rokem

      no such column name implies the original built-in sql rows might be missing. when you open your sql and view tables you should have 2. The one you created and the one it came with. Can you verify both tables exist within the sql file?

    • @WTDTravelChannel
      @WTDTravelChannel Před rokem +1

      ​@@RealisticResponse thanks you are right I made a typo and added 'name' once I removed that word everything went through fine.

    • @RealisticResponse
      @RealisticResponse  Před rokem

      @@WTDTravelChannel Great work! good debugging! Congrats on making it this far!

  • @balazsszabo3466
    @balazsszabo3466 Před rokem +1

    Somebody please help me out. I'm getting the error under "buy handles valid purchase"
    ```
    sending GET request to /signin
    sending POST request to /login
    sending POST request to /buy
    exception raised in application: TypeError: 'NoneType' object is not subscriptable
    ```
    I went trough everything printed out every value, double-checked every condition and still cannot find what is the root of the problem. I'm not returning a None value to anywhere.

    • @RealisticResponse
      @RealisticResponse  Před rokem

      I can tell you with certainty; you're overlooking something. The error indicates a but function purchase which could be sql related, but you also may have errors in each portion of your signin, login, and buy. without seeing your code, it's difficult to discern but it sounds like a sql issue. You either aren't starting with the amount of money required, or adding shares to table, or reducing money from purchase - something like that.
      This code has worked for thousands of people. If you take your time, you'll find the error. This is part of programming is identifying bugs. something is missing. or tabbed wrong. or you used - instead of =. any of these could be the issue. you have to be patient with the code.
      My code and this video are a guide. by this stage in the course you should be able to read it. you should be familiar with debugging. read the error, read the code, be patient, and update accordingly. This is all part of programming. It's something you can't stand against and must embrace is this is the path you wish to take.

  • @AnimeCluster420
    @AnimeCluster420 Před rokem +1

    Awesome been waiting for this lol

  • @arqam.hashmi
    @arqam.hashmi Před 6 měsíci +1

    Am I the only one who is getting:
    :( logging in as registered user succceeds
    expected status code 200, but got 404
    in check50?

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      Let me know if you still need help sorry for delay. Back now.

  • @ritvanriteshpartapsingh174
    @ritvanriteshpartapsingh174 Před 8 měsíci +2

    i am having a error with my check50 it says that "unknown file type......skipping" to all html and css files.sir can you please help me this?
    and my finance is working fine.
    it is also saying that can't check a frown until it turns upside down
    please sir please help me with this

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      The only thing that I think could be wrong is your file extensions and/or locations.
      you need to make sure all html files are labeled ".html" and are nested inside the "templates" folder. you need to make sure your .css file is labeled as such and is nested in your "static" file folder.
      The only thing I can think is that your files and folders are likely labeled wrong or messed up somehow.

    • @ritvanriteshpartapsingh174
      @ritvanriteshpartapsingh174 Před 8 měsíci +2

      @@RealisticResponse a lot thanks sir I fixed and got my certificate🥰🥰

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      ​@@ritvanriteshpartapsingh174 WELL DONE!!!! Congrats!!!! I'm happy for you and good job sticking to it!

  • @siddharth.chandani
    @siddharth.chandani Před měsícem +2

    Hello Sir, I am getting " Runtimeerror: no such table: users " when trying to register a new user. Please help!

    • @RealisticResponse
      @RealisticResponse  Před měsícem

      sorry for delay, please let me know if you still need help

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

  • @PadBoll
    @PadBoll Před rokem +2

    I get stuck at the register page (can't login & can't register) @5min45s. Anyone else ?

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Hey! Havent heard any issues here. Did you create the sql file so that when you register a new user it has somewhere to save that info and then log them in?

    • @sereynavives1389
      @sereynavives1389 Před rokem

      Try checking your margins and making sure they are tabbed out properly! And also make sure everything is spelled correctly.

  • @akashvasava8243
    @akashvasava8243 Před rokem +2

    Hey I encountered an error and not able to resolve it on my own can any one help me.
    The error is
    :( buy handles valid purchase
    Cause
    expected to find "9,888.00" in page, but it wasn't found
    Log
    sending GET request to /signin
    sending POST request to /login
    sending POST request to /buy
    checking that "112.00" is in page
    checking that "9,888.00" is in page

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      This is a COMMON question. Please see details and pinned notes. In the video I mention I did NOT solve this and its up to you to complete the app.py to get the digits of the numbers on your login screen down to 2 decimal places. You can use FLOAT or the built in USD or anything similar but you need to get the monies down to 2 decimal points to complete this task. Its mentioned in the video a few times and in notes I left on cideo

    • @akashvasava8243
      @akashvasava8243 Před rokem +1

      @@RealisticResponse Thanks for informing I eventually solved this problem by FLOAT logic. Thanks for this tutorial It helped a lot.

    • @RealisticResponse
      @RealisticResponse  Před rokem

      @@akashvasava8243 EXCELLENT! well done!

  • @DanialKazemii
    @DanialKazemii Před 7 měsíci +1

    Does anyone know that if there is a link that we can download the code?

    • @RealisticResponse
      @RealisticResponse  Před 6 měsíci +1

      Howdy howdy, I don't have a link that directly provides the code but I do have a discord where I try and help out if you're running in to issues.

  • @zubijaved10
    @zubijaved10 Před rokem +2

    Hello Davin this code going error so much give me a solution please . I am still coding 24 hours continuously but i stuck please

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Hey bud. This code has been checked over and over again. The code is right. If you're getting that many errors you may have to start over. patience and understanding is key here. testing is paramount. you should be testing at each stage to find errors. If you're not testing until the end and you're riddled with errors it will be impossible to find the bug. There are not detrimental errors in this code. I would recommend taking a break and starting over. When you do, test at every phase to identify errors. Do not try to complete the whole code and debug at the end.

    • @zubijaved10
      @zubijaved10 Před rokem +1

      @@RealisticResponse thanks brother but please one time you again get video of update finance just like that the previous video . I used pervious code of finance but finance is update thats why i see errors i think . I hope you update finance to another good video step by step to like 1st video of finance . thanksgiving

    • @RealisticResponse
      @RealisticResponse  Před rokem

      @@zubijaved10 I have tested finance dozens of times and made a second video showing all the testing phases quite recently. The code is correct in the video. There aren't any errors.
      There is a new video regarding the update and it shows repeated testing for accuracy. This code works.

    • @zubijaved10
      @zubijaved10 Před rokem

      @@RealisticResponse yes you write ok i try again to solve this you a great youtuber good bless

  • @jessipresten9042
    @jessipresten9042 Před 9 měsíci +2

    Hi Devin, when you are adding the transaction table am I inputting that information exactly. You had it on a notepad but where did you put the code?

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      so you're going to update it in sql.
      In your terminal (just like when we did sql) you're going to type:
      sqlite3 finance.db
      that will open the sql database and you'll update the tables with that code. Once you're done just exit SQL and get back to the code. Does that help?

    • @jessipresten9042
      @jessipresten9042 Před 9 měsíci +1

      Thank you! @@RealisticResponse

    • @jessipresten9042
      @jessipresten9042 Před 9 měsíci +1

      @@RealisticResponse I put it in my terminal and got out of it ran flask run and it still isn't working. In my history on the website it isn't listing the transaction type. I have it in my html. and I have it in my updated table but it's still not showing up.

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      @@jessipresten9042 my pleasure!

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci +1

      @@jessipresten9042 It wont show up unless you sql it and look for it. you should be able to view it if you .schema what do you mean it's not showing up?? changes to sql dont just show up - they're built into the database so its not something we see unless we pull it up like i do in the video or run .schema or run .tables or something.

  • @CircleOfTheRighteous
    @CircleOfTheRighteous Před 8 měsíci +1

    im having some trouble with the quote part. When i click get quote, the correct quote names dont show it just shows whatever i typed for the quote name and symbol. Please help Devin

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      I must be misreading this. When you lookup a quote it shows you the quote price right? I think I'm misreading this. If you can explain further I'll see what I can do.

  • @Nickstr-hk2xy
    @Nickstr-hk2xy Před 9 měsíci +1

    Hi for the sell page every dropdown option seems to be blank, as in its literally white space, this makes it so all symbols are invalid, not sure why.

    Stock Symbol
    {% for stock in stocks %}
    {{ stock['symbol'] }}
    {% endfor %}

    when I inspect the page it gives this:

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      So i've noticed some users (like mac users) are having trouble with the drop down - instead of using the drop down tr coding your sell more like your buy - using input instead of drop down. Should help fix it.

  • @leahsapkota9066
    @leahsapkota9066 Před 3 měsíci

    THANK YOU SO MUCHHHH!!!!!!i've finally finished this pset!!!!

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

  • @Zsadigzade
    @Zsadigzade Před 10 měsíci +1

    I have a question about this problem.
    I found this this problem very difficult, and to be honest, I couldn't do anything on my own. That's why I watched your tutorial.
    Since I've paid the fee for the verified certificate with a 90% discount from edX, I've been wondering:
    " Is me using most part of the code you provided in the video against the academic honesty? Can I lose my certificate because of it? "
    I really wanted to finish this course without any help from the internet, but it's just too difficult for someone like me who hasn't got a great CS knowledge.
    Could you shed some light on this point please?

    • @hi_eklavya
      @hi_eklavya Před 10 měsíci

      No, you wont loose your certificate

    • @Zsadigzade
      @Zsadigzade Před 10 měsíci

      @@hi_eklavya Thank you, really relieving.

    • @RealisticResponse
      @RealisticResponse  Před 10 měsíci +2

      My videos are meant as guides. But to answer your question let me ask you this. If you're in a group project at school. And there is a portion you dont understand, but as a team they help you and explain to you so that you DO understand. So you use the value they've given you. Do you view that as cheating? This video took me a LONG time to make and I've spent countless hours continuing to help people since posting it. the value of this video is to help you learn. not for you to copy - there are also countless changes you can make if this video helps you understand. But if you don't understand, how are you to learn and continue? I hop this better answers your question.

  • @clips1363
    @clips1363 Před 9 měsíci +3

    Brother i want ask how when i create table they say transactions is error like what is missing ?

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      This is covered in a few comments below. as well as in the video. your have to remember your SQL week.
      go into sqlite3 finance.db and update the changes necessary.
      in your terminal go into sqllite3 finance.db - update the sql database. it's explained in the video and sql should be part memory from your sql week - it's a very small update just to get the tables in

    • @clips1363
      @clips1363 Před 9 měsíci +2

      ​@@RealisticResponseso i should do in my terminal cd finance the sqlite3 fibance.db or sqlite3 finance.db directly aftter that like i put the create table transcations etc.. right?

    • @clips1363
      @clips1363 Před 9 měsíci +2

      ​@@RealisticResponse cuse when i click quote apal its great but then buy and sell and history not working i thinks its becuse sql not update i really want do it cuse its my last chance begore new year💔

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      @@clips1363 you have to click on the sql portion of the video and make sure you've made the changes to the database. It's all here. Go to the sql

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      @@clips1363 cd finance
      sqlite3 finance.db
      Be in the finance folder first always a best practice.

  • @ripequetzalcoatyl_08
    @ripequetzalcoatyl_08 Před 9 měsíci +1

    Thanks buddy this helped me a lot

  • @shauryasaxena6527
    @shauryasaxena6527 Před 9 měsíci +1

    It tells me that there's no such table for "USERS" in finance.db. Anyone got any ideas on how to resolve this?

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      your finance.db is broken - this is built in when you import our wget. try this
      cd finance
      sqlite3 finance.db
      CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username TEXT NOT NULL, hash TEXT NOT NULL, cash NUMERIC NOT NULL DEFAULT 10000.00);
      CREATE UNIQUE INDEX username ON users (username);
      this is the built in code in finance.db that has users. missing users is an issue as it's built in to your wget and should be there inherently

  • @izzyv8724
    @izzyv8724 Před 11 měsíci +1

    Do you know why I keep getting these two errors?
    :( registration rejects duplicate username
    sending POST request to /register
    exception raised in application: NameError: name 'checkUsername' is not defined
    :( registering user succeeds
    sending POST request to /register
    exception raised in application: NameError: name 'checkUsername' is not defined

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci

      The function you're using "checkUsername" in your app.py is not properly coded. My guess is the register function based on the error. You need to reevaluate the code in this portion where you define "checkUsername" to make sure it's accurate.

  • @mikeyfera
    @mikeyfera Před rokem +1

    Thank you so much for the video, helped me understand the concepts a lot more but there is one error that keeps showing up and idk where. It's within the buy function as it says a float is not iterable and gives me a type error, although it says the buy handles the purchase. If you could point me in the right direction, that would be awesome! Thanks again

    • @RealisticResponse
      @RealisticResponse  Před rokem

      I can. Try defining float in your index function. Defining it early will clear most things up. Otherwise - consider using the built in 'usd' function. if that doesn't make sense - drop a line in the discord and I'll help get it sorted! you're almost there!!!

  • @dt_does4998
    @dt_does4998 Před rokem +1

    I got this error - AssertionError: View function mapping is overwriting an existing endpoint function: register

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      means you've defined 'register to have 2 endpoints somewhere in the app.py function? This doesnt make sense.
      What stage of testing were you at when you got this error? It has to have something to do with your
      @app.route("/register", methods=["GET", "POST"])
      def register():
      function.
      make sure you have NOT 'def register' twice - that's the only thing I can think.

  • @G17MSD
    @G17MSD Před rokem +2

    hello! Great video. Just asking at 5:23 on Line 8 it states "url_for(register" is this the part where we paste the image or is this text necessary? Many thanks! 😁

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      Hi! The text is necessary. In that line (which we have on all .html files) the program is using html and flask to find and load your 'register' route/view.
      Its an html FORM that will POST a request to the listed url in the app.py file. Does that help?

  • @rezasafari6483
    @rezasafari6483 Před 8 měsíci +1

    Hello, I have this problem
    :( logging in as registered user succceeds
    application raised an exception (see the log for more details)

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      this isn't the error code I need. there's an error in your "register" function most likely. spacing, "s or something like that... I dont know without the error message.

    • @rezasafari6483
      @rezasafari6483 Před 8 měsíci +1

      eror is:
      :( logging in as registered user succceeds
      Cause
      application raised an exception (see the log for more details)
      Log
      sending GET request to /signin
      sending POST request to /login
      exception raised in application: RuntimeError: no such column: stock
      @@RealisticResponse

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      @@rezasafari6483 Error has to be in register. login i'm pretty sure is built in.
      No such table Stock means you didn't adequately update the SQL file.
      This sounds like the code has errors from the start could be typos, missed " or spacing (tab) issues. but it sounds like failure to launch. Not too much I can say except look at loops and spacing and spelling etc - take it slow and start over might be a thought too if there's issues from the beginning. Remember to TEST AT EACH STAGE. without this you'll never find errors.

  • @brandonhall6062
    @brandonhall6062 Před 10 měsíci +1

    Hi you have been so helpful. Thank you for your help during this process. I am getting so close to finally finishing up and sadly im not able to get thought the problem of this last code. it keep coming up ":( logging in as registered user succceeds application raised an exception (see the log for more details)" not sure what that problem could be. could you help?

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      didn't get a notification about this comment sorry. But the error is in your log. do you have an error you can update me on?

  • @Hoangnhatquan10
    @Hoangnhatquan10 Před 8 měsíci +1

    I followed you but the website still doesn't recognize me and I don't know what to do. You did a great job

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci +1

      Thanks for the support. Your problem is too general though. This code works. It's been tested thousands of times at this point. So something is off in yours but I'm not sure what. If you can be more specific, i may be able to help.

    • @Hoangnhatquan10
      @Hoangnhatquan10 Před 8 měsíci

      When I run flask run and click on the thhif file, it shows up on the website but it doesn't have a register or quote or buy or sell. The entire website is still the same as when I first opened the source code. Thank you bro.
      @@RealisticResponse

    • @Hoangnhatquan10
      @Hoangnhatquan10 Před 8 měsíci

      When I followed you, you watched the video details, but after the code was finished, it was not linked together, what should I do? Please help.
      @@RealisticResponse

  • @TeamUpWithAI
    @TeamUpWithAI Před rokem +2

    Guys, be careful when creating the files for your templates because if you just go to File - New File, the default option is to create your html files in the Finance folder, and you want them in the Templates folder :D Yes, I was that idiot who didn't pay attention and re-wrote the code 1398203 times for no reason ... :D

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      Thanks so much for sharing this! It's invaluable information lol we've all been there and sharing our mistakes will always help others avoid them. This is why i love the coding community! Keep up the great work!!!

    • @TeamUpWithAI
      @TeamUpWithAI Před rokem +1

      @@RealisticResponse I still cant believe the silly mistake, but that's why I shared it also, I can imagine other people doing the same thing :D

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      @@TeamUpWithAI lol understand completely. But I'm glad you found and shared. Thanks again!

    • @danielokoliegbe5208
      @danielokoliegbe5208 Před rokem

      LOL this happened to me multiple times had to restart so many times

    • @bookwormd8627
      @bookwormd8627 Před 9 měsíci +1

      @@RealisticResponse wait so if I made a transactions.sql file for the transaction table, that should go under the template folder?

  • @pirate3082
    @pirate3082 Před rokem +1

    sir i have three errors
    1-> quote handles valid ticker symbol
    expected to find "28.00" in page, but it wasn't found
    2-> buy handles fractional, negative, and non-numeric shares
    application raised an exception (see the log for more details)
    3-> sell handles invalid number of shares
    expected status code 400, but got 200
    please help me
    i spend many days on this errors

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Hey Pirate. I mention this a few times in the video and in the description. You need to update app.py function where on your index it gets the decimals down to just 2 decimal places. This part of the code is up to you. review your INDEX function on app.py and update the code so that it's NOT unlimited 0's after. get it down to TWO decimal places using FLOAT or the already defined USD. I can't give you the solution but that is the HOW on how to fix that.

  • @user-ob6ux6xo9k
    @user-ob6ux6xo9k Před 8 měsíci +1

    Hi! When I try to buy shares the “shares must be a positive integer” but my code says
    “Elif not shares or not shares.isdigit() or int(shares)

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      Sorry for the delay - been away - let me know if you still need help.

  • @Mrcrossfire9999
    @Mrcrossfire9999 Před 8 měsíci +1

    Hello i think i need your help, i did the code exactly like yours , but it gives me a error message saying " expected to find "9,888.00" i page, but it wasnt found" (i did exactly like yours because with my changes to your code it gave me the same error message) any help?

    • @RealisticResponse
      @RealisticResponse  Před 8 měsíci

      I mention this 3 times in the video and in the description and in many, many comments. Its a very simple feature that I left out on purpose but if you read through some comments here you'll find the help you need to solve.

  • @bookwormd8627
    @bookwormd8627 Před 9 měsíci +1

    Hey, I ran check50 and got the following
    :( registering user succeeds
    IndexError: list index out of range
    :( registration rejects duplicate username
    IndexError: list index out of range
    I don't understand this error, could you help?

    • @RealisticResponse
      @RealisticResponse  Před 9 měsíci

      index out of range
      Go through your app.py and look at the SQL Commands.
      # Query database for username
      rows = db.execute("SELECT * FROM users WHERE username = ?", request.form.get("username"))

  • @VinkkieZ
    @VinkkieZ Před 11 měsíci +1

    In the history page, is the column Type supposed to be empty? Are we supposed to tell whether is a buy or sell transaction?

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci +1

      You could add buy and sell to the table but the + and - in front would indicate a buy or sell. but yes. I love the idea of adding this to the table.

  • @nedamarija5767
    @nedamarija5767 Před 11 měsíci +1

    Why do I get the error message: "return can only be used within a function"? Do i have to implement the whole code first, before running flask?

    • @RealisticResponse
      @RealisticResponse  Před 11 měsíci

      Absolutely not. nor should you. You should be testing your code at each stage to find things like this. This error is telling you precisely that whatever portion of the code you're working on, the "return" function is not in the right loop.
      The error is likely in your app.py file. make sure the return function is properly tabbed.

  • @pf6993
    @pf6993 Před 5 měsíci +1

    Does this video also work for the 9th week of the cs50x course of 2024 and give us the correct answer?

    • @RealisticResponse
      @RealisticResponse  Před 4 měsíci

      Last time I checked (Early feb) the answer is yes - I took a few months break and am getting back to all weeks and updating videos.

  • @angelgabrielraus2952
    @angelgabrielraus2952 Před 2 měsíci +1

    Could you update the video, please? I have been issues with my code on July

    • @RealisticResponse
      @RealisticResponse  Před měsícem

      Last I ran this code it cleared all green - I've run it thousands of times now. It will get an update in 2025 as it seems to still work. This particular video is a huge undertaking. Perhaps if you elaborate the problem I can assist.

    • @cricfever_30
      @cricfever_30 Před měsícem

      I need help related to finance project please reply me 🙏

  • @yy1ummz88
    @yy1ummz88 Před rokem +1

    Thank you so much for the video, helped me understand the concepts a lot more but there is one error that keeps showing up and idk where. I tried everything i could and it didnt go away I thought it may be bc the usd function but i fixed it and i still got this error::( buy handles valid purchase
    Cause
    application raised an exception (see the log for more details)
    Log
    sending GET request to /signin
    sending POST request to /login
    sending POST request to /buy
    exception raised in application: TypeError: unsupported format string passed to Undefined.__format__

    • @RealisticResponse
      @RealisticResponse  Před rokem

      Hey. Not sure what lead you to believe this was a usd issue. usd is defined in helpers.c with no need to adjust so i can't see why it would be usd but i suppose its possible. My knee jerk reaction is i could be a few things:
      Template syntax - missing or improper curly braces or parenthesis where you might be using blocks or extending blocks would be my first guess.
      URL Endoints - incorrect endpoints ir misspelling of urls and or names thereof
      SQL queries - make sure the table is setup correctly to register buy/sell
      The issue here is i'm not sure WHERE during your testing phase this error occurred. If testing happened only at the end of coding then it's difficult to pinpoint.
      Something tells me it wasn't the usd function - may be much more simple than that. as simple as a typo.

    • @yy1ummz88
      @yy1ummz88 Před rokem +1

      @@RealisticResponse thank you, that is right. I fixed it.

    • @RealisticResponse
      @RealisticResponse  Před rokem +1

      @@yy1ummz88 :whew: ! good job!

  • @DLG19
    @DLG19 Před rokem +1

    I Have a problem in check50 with something called "can't check until a frown turns upside down" how do I solve it?

    • @RealisticResponse
      @RealisticResponse  Před rokem

      There's an error and you have to check the log to see where and what the error is. Check you're error log like you've been doing.