Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,208,830 members, 8,003,934 topics. Date: Saturday, 16 November 2024 at 12:11 AM

Help! "Internal Server Error" For A Football Match Prediction App - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Help! "Internal Server Error" For A Football Match Prediction App (232 Views)

Who Can Decipher This Error For Me? / Somebody Help..... Am Having Error 500 Internal Server Error / Xampp Server User Please Come In And Assist (2) (3) (4)

(1) (Reply)

Help! "Internal Server Error" For A Football Match Prediction App by haj57(m): 6:08am On Jul 26, 2023
I am developing a football match prediction app in python/django.

views.py has 3 major functions: def (matrix) generates random numbers using "secrets" module of python. The numbers are validated with an algorithm which returns either "valid" or "invalid". If valid, the next function is called, otherwise, new set of random numbers are generated.

def (sincerity) checks whether the match is actually scheduled. An algorithm returns either "sincere" or "Oops! We detected an error ..." If sincere, the next function is called, otherwise, user gets a response in frontend "Oops! We detected an error ..."

def determine_winner(home_team, away_team) uses 5 algorithms tagged formula 1, formula 2, ... formula 5. A summary of the 5 formulae returns "home team will win", "away team will win", "it will be a draw" or "sorry, we cannot determine match winner".

These steps make up the function, def process_form (request).

When I submit request, instead of getting the desired response, I get "Internal Server Error: /process_form/". Note that app is yet to be deployed to a live server.

Internal Server Error: /process_form/ 
Traceback (most recent call last):

File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\handlers\exception.py", line 55, in inner
response = get_response

File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\handlers\base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\django\views\decorators\csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)

File "C:\Users\User\PycharmProjects\Prof\prof\profapp\views.py", line 1031, in process_form
sincere = sincerity()

File "C:\Users\User\PycharmProjects\Prof\prof\profapp\views.py", line 567, in sincerity
r1c1, r2c1, r3c1, r4c1, r1c2, r2c2, r3c2, r4c2, r1c3, r2c3, r3c3, r4c3, r1c4, r2c4, r3c4, r4c4, \
ValueError: not enough values to unpack (expected 64, got 7)


Files with errors are in: github . com / hajimlimas / www (remove spaces)

Thank you.

(1) (Reply)

Pls Can Someone Enlighten Me On This / Who Can Use Matlab And Simulink To Solve Process Control Problems? / Elon Musk Starlink Available For Sale + Router

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.