ScottyLabs / course-api

The new version of the Scheduling API, now with prerequisites, course descriptions, and more!
https://scottylabs.org/course-api/
MIT License
21 stars 14 forks source link

NoneType no Find (bug) #57

Open SAMFYB opened 6 years ago

SAMFYB commented 6 years ago

Hi,

When I recently used cmu-course-api utility to scrap 2018 Fall courses, I found error something like NoneType object cannot be called on the "find" method. The error occurs because some courses do not have a 'desc' entry. (Specifically, 51103, 82701, 82893, 90861, for now.) A single occurrence of this error would stop a thread, so the four courses stopped all four threads, and caused a stalemate (I don't know why the program would NOT just die.) Anyway, I've managed to scrap the data only after I changed the source code, adding an error-catch when this happens (in the "get_course_desc" method).

justinchuby commented 5 years ago

This happens when the object that's supposed to be a beautifulsoup object is None.