inducer / relate

RELATE is an Environment for Learning And TEaching

Home Page:http://documen.tician.de/relate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in create course

KlavsKlavsen opened this issue · comments

When filling out create course for the first time, i get this error:
" Course creation failed: AttributeError: 'NoneType' object has no attribute 'pages' "

if I switch to a https url for git (instead of ssh url - for gitlab) - I get a diff error - so I am guessing its about the handling of SSH urls like:
ssh://git@gitlab.example.com:2223/test/quiz1.git

 Traceback (most recent call last):                                                                                                                                                                                                      
   File "/var/www/relate/course/versioning.py", line 271, in set_up_new_course                                                                                                                                                           
     raise e                                                                                                                                                                                                                             
   File "/var/www/relate/course/versioning.py", line 222, in set_up_new_course                                                                                                                                                           
     validate_course_content(  # type: ignore                                                                                                                                                                                            
   File "/var/www/relate/course/validation.py", line 1512, in validate_course_content                                                                                                                                                    
     validate_flow_desc(vctx, location, flow_desc)                                                                                                                                                                                       
   File "/var/www/relate/course/validation.py", line 1061, in validate_flow_desc                                                                                                                                                         
     if not isinstance(grp.pages, list):                                                                                                                                                                                                 
 AttributeError: 'NoneType' object has no attribute 'pages' 

so it seems more like its some validation bug?

Thanks for the report! #904

@inducer I tested the fix - by cloning bcf963f
and I still get this error:
Course creation failed: AttributeError: 'NoneType' object has no attribute 'id'

Could you post a full traceback? That's a different issue AFAICT (note id vs pages), but I'll reopen this to track that, too.

 Traceback (most recent call last):                                                                                                                                                                                                      
   File "/var/www/relate/course/versioning.py", line 271, in set_up_new_course                                                                                                                                                           
     raise e                                                                                                                                                                                                                             
   File "/var/www/relate/course/versioning.py", line 222, in set_up_new_course                                                                                                                                                           
     validate_course_content(  # type: ignore                                                                                                                                                                                            
   File "/var/www/relate/course/validation.py", line 1523, in validate_course_content                                                                                                                                                    
     validate_flow_desc(vctx, location, flow_desc)                                                                                                                                                                                       
   File "/var/www/relate/course/validation.py", line 1070, in validate_flow_desc                                                                                                                                                         
     "group_id": grp.id})                                                                                                                                                                                                                
 AttributeError: 'NoneType' object has no attribute 'id' 

I do keep hitting interesting bugs no on else hits - for reasons unknown to me I'm way too good a bugfinder :)

Thank you for caring - I am looking forward to enabling it to be much easier to spin up for those who aren't like us (ie. not used to spinup a Linux system 'the good old way') :)

You do seem to have a knack for finding holes in the flow validation. :) #908 should plug this particular class of bugs. In general, it'd be useful to have small reproducing examples so I can add regression tests, but it's not required. At any rate, thanks for your patience, too!