-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Parsing Assignments #13
Comments
Hi there! This is happening where the code extracts assignment types from the titles PCR gives. It might be failing if any of your teachers posted an assignment with a type containing parentheses in it. Could you go to the PCR website and see if any of the assignments posted there have an assignment type containing parenthesis (you can find the type by hovering over an assignment and looking at the item in parenthesis after the assignment's name)? Rather than hovering over each assignment you could alternatively run the following in the Developer Console: console.log(Array.from(new Set(Array.from(document.getElementsByClassName("rsApt rsAptSimple")).map(x=>(a=x.querySelector("span[id$=\"lblTitle\"]"))?a.innerHTML:null))).join("\n")) This will print out a list of all unique assignment titles, and from their you can look at what's in the parenthesis to find the types. If there are any assignment types with parenthesis inside, would you be willing to post them so I could see if they're what is causing the problem or not? Thank you for reporting the issue! |
Also, sometimes my assignments return but the order they are in is mixed up. I have this week´s assignments first and then I have March 26th to April 15th assignments with next week´s assignments last. |
Okay so it seems as if stuff should be working then. The examples you posted wouldn't cause the error, so the only way to find out what's causing the error would be to add If you have difficulty getting this to work I could also push an update to generate more output for this error. As for the mixed order, I'm not sure at all what's happening. In my experience the only time the order gets mixed up in Calendar view is when you switch from week view from month view, but then it goes to the correct order after refreshing. Are you perhaps frequently switching date ranges in PCR? Thanks! |
Okay I'll try to update it soon. |
Sorry for taking so long. When you can try switching to that branch and resubmitting whatever error that gives (which should hopefully include the problem-causing title). |
I believe the issue has been solved. Thank you so much for fixing it. |
That update was only supposed to give more information in the error, not fix the issue. If an assignment with a similar assignment type ever comes up again, hopefully a more descriptive error message will be generated. Thanks! |
Every time I open Check PCR, a popup shows that says "Are you in week or month view?" This shows even though my regular PCR is on month view. This is copied and pasted from the popup.
Message: Cannot read property '1' of null
Stack: TypeError: Cannot read property '1' of null
at parse (chrome-extension://nlppblbfamffglclfjgflgpkalncnfni/client.js:482:53)
at chrome-extension://nlppblbfamffglclfjgflgpkalncnfni/client.js:282:11
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Version: 2.24.3
The text was updated successfully, but these errors were encountered: