CustomCryptocurrency
CustomCryptocurrency copied to clipboard
Can't register in web app.
Gives 500 Internal Server Error.
In run.py terminal, it gives this error:
[2021-05-23 16:59:58,636] ERROR in app: Exception on /register [POST] Traceback (most recent call last): File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\sqlalchemy\util_collections.py", line 1008, in call return self.registry[key] KeyError: <greenlet.greenlet object at 0x000002C09A291510 (otid=0x000002C09BC475C0) current active started main>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\Coding\OneDrive\Desktop\CustomCrypocurrency\gymcoin\routes.py", line 60, in register
if form.validate_on_submit():
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_wtf\form.py", line 100, in validate_on_submit
return self.is_submitted() and self.validate()
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\wtforms\form.py", line 318, in validate
return super(Form, self).validate(extra)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\wtforms\form.py", line 150, in validate
if not field.validate(self, extra):
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\wtforms\fields\core.py", line 226, in validate
stop_validation = self.run_validation_chain(form, chain)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\wtforms\fields\core.py", line 246, in run_validation_chain
validator(form, self)
File "C:\Users\Coding\OneDrive\Desktop\CustomCrypocurrency\gymcoin\forms.py", line 28, in validate_username
user = User.query.filter_by(username = username.data).first()
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_sqlalchemy_init.py", line 552, in get
return type.query_class(mapper, session=self.sa.session())
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\sqlalchemy\orm\scoping.py", line 129, in call
return self.registry()
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\sqlalchemy\util_collections.py", line 1010, in call
return self.registry.setdefault(key, self.createfunc())
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\sqlalchemy\orm\session.py", line 4065, in call
return self.class(**local_kw)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_sqlalchemy_init_.py", line 176, in init
bind = options.pop('bind', None) or db.engine
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_sqlalchemy_init_.py", line 998, in engine
return self.get_engine()
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_sqlalchemy_init_.py", line 1017, in get_engine
return connector.get_engine()
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_sqlalchemy_init_.py", line 594, in get_engine
self.engine = rv = self.sa.create_engine(sa_url, options)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\flask_sqlalchemy_init.py", line 1027, in create_engine
return sqlalchemy.create_engine(sa_url, **engine_opts)
File "
Help would be appreciated.
"ImportError: DLL load failed while importing _sqlite3: The specified module could not be found."
Change the import _sqlite3 to import sqlalchemy. If that doesn't work try to do import sqlite plain and simple. Have a nice day.
copy sqlite.dll
Try copying the sqlite3.dll from the
C:\Users\YOURUSER\anaconda3\Library\bin
folder to
C:\Users\YOURUSER\Anaconda3\DLLs
Hey, can anyone please clarify in helping fix this while registering
Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.