Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • please post the actual error message instead of breaking it apart, just copy and paste it. dont just try things randomly, understand what your code says and should say and figure out why it isnt doing what you think it should be doing. Otherwise you are just adding random noise to your code. Commented Feb 7, 2024 at 16:24
  • why do you keep casting shares to an int, when you casted the result of the input to an int to start with? Unnecessary. Commented Feb 7, 2024 at 16:26
  • can you include the login function? your code looks fine otherwise Commented Feb 7, 2024 at 16:47
  • It doesn't make sense that the trades row is inserted if it gave an exception. Is the correct user_id in the inserted row? Suggest you wrap each execute in a try: loop to narrow things down. And it would be important to know the exact error message. Commented Feb 7, 2024 at 17:09
  • I edited the OP with the original error log + /login route Commented Feb 7, 2024 at 18:10