Issue in student - Timetable page
zakeerms opened this issue · 6 comments
I got an error in this page
MultipleObjectsReturned at /info/student/CS3A/timetable/
Kindly help me to fix this issue
Request Method: | GET |
---|---|
http://127.0.0.1:8000/info/student/CS3A/timetable/ | |
2.2.6 | |
MultipleObjectsReturned | |
get() returned more than one AssignTime -- it returned 2! | |
C:\Program Files\Anaconda3\lib\site-packages\django\db\models\query.py in get, line 412 | |
C:\Program Files\Anaconda3\python.exe | |
3.6.0 | |
['E:\SVN\Python\SourceCode\SAU-ERP', 'C:\Program Files\Anaconda3\python36.zip', 'C:\Program Files\Anaconda3\DLLs', 'C:\Program Files\Anaconda3\lib', 'C:\Program Files\Anaconda3', 'C:\Users\zakee\AppData\Roaming\Python\Python36\site-packages', 'C:\Program Files\Anaconda3\lib\site-packages', 'C:\Program Files\Anaconda3\lib\site-packages\Sphinx-1.5.1-py3.6.egg', 'C:\Program Files\Anaconda3\lib\site-packages\win32', 'C:\Program Files\Anaconda3\lib\site-packages\win32\lib', 'C:\Program Files\Anaconda3\lib\site-packages\Pythonwin', 'C:\Program ' 'Files\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg'] | |
Sat, 9 Nov 2019 02:44:19 +0000 |
for j in range(12):
if j == 0:
matrix[i][0] = d[0]
continue
if j == 4 or j == 8:
continue
try:
a = asst.get(period=time_slots[t][0], day=d[0])
…
matrix[i][j] = a.assign.course_id
except AssignTime.DoesNotExist:
pass
t += 1
context = {'matrix': matrix}
error in this python file, info\views.py in timetable
line number 219,
a = asst.get(period=time_slots[t][0], day=d[0])
I have modified the sqlite3 file and it should work now.
There was an error because two classes were assigned to the same time slot.
Thanks bro, Great Job you have done :), Let me know your contact details.
Thanks a lot! You contact me through my email samarthp1@gmail.com
I sent an email, please check.
While running this project with MSSQL database connection, I got an error saying:
"django.db.utils.ProgrammingError: ('42S02', "[42S02] [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Invalid object name 'info_user'. (208) (SQLExecDirectW); [42S02] [Microsoft
][ODBC Driver 11 for SQL Server][SQL Server]Statement(s) could not be prepared. (8180)")
[18/May/2020 19:13:24] "POST /accounts/login/?next=/ HTTP/1.1" 500 215879"
Can you please help me out to get it resolved?