NLP4ALL / nlp4all

NLP4All is a learning platform for educational institutions to help students that are not in data-oriented fields to understand natural language processing techniques and applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Registration is a mess

franciscoabenza opened this issue · comments

commented

@franciscoabenza can we get some more details? e.g. what's broken, how it should work correctly (or a suggestion of what to fix) :)

At least on my try:

BuildError
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'login'. Did you mean 'user_controller.login' instead?

Traceback (most recent call last)
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 2548, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 2528, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "c:\Users\emilr\OneDrive - Aarhus universitet\Uni\NLP4ALL\nlp4all\nlp4all\controllers\UserController.py", line 114, in register
return redirect(url_for("login"))
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\helpers.py", line 256, in url_for
return current_app.url_for(
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 2031, in url_for
return self.handle_url_build_error(error, endpoint, values)
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\flask\app.py", line 2020, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
File "C:\Users\emilr\Anaconda3\envs\nlp4all\lib\site-packages\werkzeug\routing\map.py", line 917, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'login'. Did you mean 'user_controller.login' instead?

Hey guys I left it yesterday half way done. The target 🎯:
Screenshot 2022-11-07 at 12 23 49

including the backend for it. give me feedback @zeyus @emilroenn

@arthurhjorth, is there any reason why it was designed from the beginning with username? We thought that in a class enviorment it would be useful for the teacher to know the students by name. Tell me what you think :)

Hah, yes there is a reason but it's not a good one. Creating the user registration forms, User db model, and sign up process was the first thing I ever did in Flask and I was following a tutorial without really thinking about it because I didn't totally understand what I was doing. I definitely agree it would be more useful with the actual name, and feel free to change.

That said, I haven't seen that error before. I've definitely had people sign up in the past few months, so not sure what happened there. Don't know if somehow the @app.route decorator got deleted somehow. But if you change it all anyway, it shouldn't matter.