Python Cryptocurrency Part 6: Adding Forms

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 44

  • @brycejunkinz
    @brycejunkinz 3 роки тому +6

    This tutorial is honestly really good exposure to all parts of the stack lol. Like I came here for blockchain but I'm learning a lot about sql flask and html

  • @FreeRoger
    @FreeRoger 3 роки тому +3

    Every time I run app.py like you did in the beginning, I get the error message AttributeError: 'MySQL' object has no attribute 'connection'. What should I do?

  • @moggyval3320
    @moggyval3320 4 роки тому +2

    im so thankful for you

  • @emilioalcantara3277
    @emilioalcantara3277 3 роки тому

    I have this error:
    C:\Users\Emi\Desktop\Sankacoin>app.py
    Traceback (most recent call last):
    File "C:\Users\Emi\Desktop\Sankacoin\app.py", line 9, in
    from sqlhelpers import *
    File "C:\Users\Emi\Desktop\Sankacoin\sqlhelpers.py", line 1, in
    from app import mysql, session
    ImportError: cannot import name 'mysql' from 'app' (C:\Users\Emi\Desktop\Sankacoin\app.py)
    Why it happens?

  • @user-qt4fs2mo4t
    @user-qt4fs2mo4t 2 роки тому +1

    After I completed your 2:11 code, I ran the app.py file, and my website reported an error (MySQLdb._exceptions.OperationalError: (1045, "Access denied for user'root'@'localhost' (using password: YES)"))

    • @nailabou8105
      @nailabou8105 7 місяців тому

      I'm getting this error, any ideas???

  • @carrillojustin3379
    @carrillojustin3379 2 роки тому

    hi...can anyone help me undestand why when i reloded the page like he did on minute 5:00 i got : 404 Not Found...the requested URL was not found on the server. if you entered the URL manually please check your spelling and try again.

  • @harshmishra82
    @harshmishra82 Рік тому +1

    My localhost page is throwing an error (MySQLdb._exceptions.OperationalError: (1045, "Access denied for user'root'@'localhost' (using password: NO)")) as soon as I add the users line of code ( 2:45 ). Anyone here who can help?

    • @nailabou8105
      @nailabou8105 7 місяців тому

      I'm getting this error any solution??

    • @harshmishra82
      @harshmishra82 7 місяців тому

      @@nailabou8105 Yeah the problem was solved somehow. I don't quite remember how as it was a year ago but you should check if you're writing your own password correctly.

  • @chaitanyadawar7777
    @chaitanyadawar7777 3 роки тому

    Hey I really like your series on how to create a crypto with python Thanks for making it btw i have a bug it says RegisterForm not defined but i have even defined the class is there somewhere else where you defined the RegisterForm

  • @Waterparkshark
    @Waterparkshark 4 роки тому +1

    Hey, I love this series! Is there a repository where I can download the code? I'm running into a problem with unused variables in the "sqlhelpers" file and a problem where it doesn't add the new user onto the table in the "app" file. If I could go over the code, it would be easier to find and identify my mistakes. Thank you

    • @willassad8670
      @willassad8670  3 роки тому +2

      Sorry for the later response, but yes, all of the code is on GitHub in a link in the video description of some of the videos.

  • @edwarburren12
    @edwarburren12 2 роки тому

    Greetings bro, it seems to me that at minute 1:35 when you declared the users variable when executing it, it throws an error because that variable already exists in sqlhelpers

  • @Thelaibakhan
    @Thelaibakhan 3 роки тому +2

    Any windows user here??

  • @moggyval3320
    @moggyval3320 4 роки тому +1

    i'm having a problem , when i refresh it doesnt add the user and i have sqlhelpers imported and sqlhelpers is the code you gave last video..

    • @willassad8670
      @willassad8670  4 роки тому +2

      Is there a specific exception being raised? If not, there might be a typo in your mysql syntax... try the code sql_raw(“INSERT into users(name,email,username,password) VALUES(test,test,test,test)”) on the index page and refresh. See if this is added to your mysql table

    • @moggyval3320
      @moggyval3320 4 роки тому +1

      @@willassad8670import sys
      from flask import Flask, render_template, flash, redirect, url_for, session, request, logging
      from passlib.hash import sha256_crypt
      from flask_mysqldb import MySQL
      from sqlhelpers import *
      app = Flask(__name__)
      app.config['MYSQL_HOST'] = 'localhost'
      app.config['MYSQL_USER'] = 'root'
      app.config['MYSQL_PASSWORD'] = '8651'
      app.config['MYSQL_DB'] = 'crypto'
      app.config['MYSQL_CURSORCLASS'] = 'DictCursor'
      mysql = MySQL(app)
      @app.route("/")
      def index():
      users = Table("users", "name", "email", "username", "password")
      users.insert("John Doe","jd@gmail.com","johndoe","hash")
      #users.drop()
      return render_template('index.html')
      if __name__ == '__main__':
      app.secret_key= '12345'
      app.run(debug = True)

    • @moggyval3320
      @moggyval3320 4 роки тому

      its not giving an error its just not adding to the table, i check the table and its empty but its there

    • @willassad8670
      @willassad8670  4 роки тому +1

      unbreakabul2 Can you add to the table using the line of code I gave earlier?

    • @moggyval3320
      @moggyval3320 4 роки тому +1

      one second ill try: "Invalid identifier" its high lights INSERT, do i need to move the qoutes?

  • @chimauchenjoku3494
    @chimauchenjoku3494 3 роки тому

    I am using Postgresql, I am unable to import database on sqlhelpers.py file

  • @cockybhai3638
    @cockybhai3638 3 роки тому

    Hey man, great series. I'm actually getting mysqldb._exceptions.Operational error
    (2059,"authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found.
    ")
    Any help is appreciated

  • @brotzrekt5788
    @brotzrekt5788 3 роки тому

    My insert methods run twice if i use a page with bootstrap and faivicon.
    How i can solve it?

    • @willassad8670
      @willassad8670  3 роки тому

      Maybe you are loading the page twice?

    • @brotzrekt5788
      @brotzrekt5788 3 роки тому

      @@willassad8670 i solved, the problem was that i put href=' ' in a img and not href='#' so the app had to refresh 2 times

  • @Thelaibakhan
    @Thelaibakhan 3 роки тому

    I'm getting the error ----- NameError: name 'isnewtable' is not defined

  • @sammacfie2836
    @sammacfie2836 2 роки тому

    Hi all, I'm getting this error. Any ideas? Thanks in advance.
    ImportError: cannot import name '_mysql_password' from 'passwords'

    • @gabrielagreste
      @gabrielagreste 2 роки тому

      password is a file which he created in the same folder, he does not calling the module. For example, you can create a file named "mypassword.py" and then you only write _mysql_password = "yourpassword". Then you can insert it as from mypassword import _mysql_password

    • @jankruit6089
      @jankruit6089 3 місяці тому

      The author put his password in a separate passwords file. You can use your own password.

  • @justsomenamelesssoul8097
    @justsomenamelesssoul8097 3 роки тому

    Well, i don't really understand why are you showing me web development instead of cryptocurrency but i'll watch it anyway xD

    • @willassad8670
      @willassad8670  3 роки тому +1

      We have already made the cryptocurrency and now we are implementing the front end!

    • @justsomenamelesssoul8097
      @justsomenamelesssoul8097 3 роки тому

      @@willassad8670 Yep, i catched up, question tho, how does stuff like Bech32 work in BTC? I mean, how money is sent or stored and how wallets are made using hashing?

    • @willassad8670
      @willassad8670  3 роки тому

      @@justsomenamelesssoul8097 A lot of complicated cryptography which is really number theory at its core. Would you be interested in the mathematical side of crypto?

    • @justsomenamelesssoul8097
      @justsomenamelesssoul8097 3 роки тому

      @@willassad8670 yeah, that's very interesting