Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't register in web app. #26

Open
NewtonJr4108 opened this issue May 23, 2021 · 3 comments
Open

Can't register in web app. #26

NewtonJr4108 opened this issue May 23, 2021 · 3 comments

Comments

@NewtonJr4108
Copy link

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 "", line 2, in create_engine
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\sqlalchemy\util\deprecations.py", line 298, in warned
return fn(*args, **kwargs)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\sqlalchemy\engine\create.py", line 548, in create_engine
dbapi = dialect_cls.dbapi(**dbapi_args)
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\site-packages\sqlalchemy\dialects\sqlite\pysqlite.py", line 473, in dbapi
from sqlite3 import dbapi2 as sqlite
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\sqlite3_init
.py", line 23, in
from sqlite3.dbapi2 import *
File "\LAPTOP-DF7SK2QD\Users\Coding\anaconda3\lib\sqlite3\dbapi2.py", line 27, in
from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.
127.0.0.1 - - [23/May/2021 16:59:58] "←[35m←[1mPOST /register HTTP/1.1←[0m" 500 -


Help would be appreciated.

@NTechStorm
Copy link

"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.

@gptshubham595
Copy link

copy sqlite.dll

Try copying the sqlite3.dll from the

C:\Users\YOURUSER\anaconda3\Library\bin

folder to

C:\Users\YOURUSER\Anaconda3\DLLs

@Mohnish2004
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants