Neg5 to SQBS Parser

The scariest thing of all is Protobowl
Post Reply
User avatar
Illinois Admin
Lulu
Posts: 86
Joined: Mon Apr 03, 2017 11:11 pm
Location: Urbana, Illinois

Neg5 to SQBS Parser

Post by Illinois Admin » Tue Oct 30, 2018 2:19 pm

Hey everyone, here is the neg5 (QBJ) to SQBS parser that I have previously mentioned in other posts. It worked perfectly on the first tournament we used it on but there are likely cases where it will fail (ties and forfeits for example). I did not create this and I definitely lack the tech knowledge needed to explain it well so I won't try to. If you have questions about it let me know and I will pass it on to the man who made it. Here are the instructions that were sent with the files to me

"The JSON file contains some tournament/SQBS metadata that needs to be filled out for the script to run properly.
To run, you must have python installed. From a terminal, enter:
"python qbj_parser.py <qbj_file> <settings_file>"


here's the link to the files

Thanks again to Bryan Lu for making this and I hope it helps people running tournaments.
Bradley McLain
Rockford Auburn High School (2012-2015)
University of Illinois at Urbana-Champaign (2015-)
College Liaison - IHSSBCA (2017-)
Assistant Coach-like Person - University Laboratory High School (2017-)

sgoebel
Lulu
Posts: 34
Joined: Sat Mar 11, 2017 9:44 pm
Location: Shreveport, LA

Re: Neg5 to SQBS Parser

Post by sgoebel » Tue Oct 30, 2018 4:47 pm

It appears to have worked pretty flawlessly after I fixed a few mistakes in total TUH for a few matches. I was unsure of how to enter a forfeit into neg5, so those were entered as 10 - 0 games and were easy to change to forfeits once the SQBS file was made. Thank you so much!
Stephen Goebel
Coach, C.E. Byrd High School, Shreveport, LA

User avatar
Illinois Admin
Lulu
Posts: 86
Joined: Mon Apr 03, 2017 11:11 pm
Location: Urbana, Illinois

Re: Neg5 to SQBS Parser

Post by Illinois Admin » Tue Oct 30, 2018 10:53 pm

sgoebel wrote:
Tue Oct 30, 2018 4:47 pm
It appears to have worked pretty flawlessly after I fixed a few mistakes in total TUH for a few matches. I was unsure of how to enter a forfeit into neg5, so those were entered as 10 - 0 games and were easy to change to forfeits once the SQBS file was made. Thank you so much!
I'm glad it worked! If anyone else who uses this finds any issues with be sure to let me know so I can have the creator take a look at it
Bradley McLain
Rockford Auburn High School (2012-2015)
University of Illinois at Urbana-Champaign (2015-)
College Liaison - IHSSBCA (2017-)
Assistant Coach-like Person - University Laboratory High School (2017-)

User avatar
AGoodMan
Wakka
Posts: 247
Joined: Sat Dec 20, 2014 10:25 pm

Re: Neg5 to SQBS Parser

Post by AGoodMan » Sun Nov 11, 2018 8:31 pm

What does the comment "Pools used, but [team name] is not assigned to a pool" mean? I've checked that every team is placed in both a prelim and playoff bracket so I'm a little confused.
Jon Suh
Wheaton Warrenville South '16
Harvard '20
PACE

sgoebel
Lulu
Posts: 34
Joined: Sat Mar 11, 2017 9:44 pm
Location: Shreveport, LA

Re: Neg5 to SQBS Parser

Post by sgoebel » Mon Nov 12, 2018 7:31 pm

I think you left a team (or more than one) off in the parser_settings.json file, or at least I was able to duplicate your error message by doing this.
Stephen Goebel
Coach, C.E. Byrd High School, Shreveport, LA

Joshua Rutsky
Tidus
Posts: 537
Joined: Mon Oct 24, 2005 9:59 am
Location: Hoover, AL

Re: Neg5 to SQBS Parser

Post by Joshua Rutsky » Fri Nov 16, 2018 2:46 pm

I have tried to do this multiple times, and I keep getting syntax errors when entering the command to launch the parser. My QBJ file is titled HIT, and my json file is HITSET; would you please post the syntax as it should be entered into the python prompt using these names to see if I'm making a big error here?
Joshua Rutsky
Coach, Hoover High School, Hoover, AL
Member of the Qwiz Team!

User avatar
sephirothrr
Quizbowl Detective Extraordinaire
Posts: 174
Joined: Sun Mar 23, 2008 11:00 pm
Location: Louisville, KY

Re: Neg5 to SQBS Parser

Post by sephirothrr » Fri Nov 16, 2018 2:52 pm

Can you post the errors that you're getting? It's likely that you may have the wrong version of python installed.
Ramapriya Rangaraju
Kentucky Quiz Bowl Alliance
University of Louisville
duPont Manual High School
Birdofredum Sawin wrote:If you don't want to be regarded as a "raving lunatic," it might be advisable to rave less, or at least to do so in a less loony manner.

Joshua Rutsky
Tidus
Posts: 537
Joined: Mon Oct 24, 2005 9:59 am
Location: Hoover, AL

Re: Neg5 to SQBS Parser

Post by Joshua Rutsky » Fri Nov 16, 2018 4:41 pm

All of the errors I get are syntax errors.
Joshua Rutsky
Coach, Hoover High School, Hoover, AL
Member of the Qwiz Team!

User avatar
sephirothrr
Quizbowl Detective Extraordinaire
Posts: 174
Joined: Sun Mar 23, 2008 11:00 pm
Location: Louisville, KY

Re: Neg5 to SQBS Parser

Post by sephirothrr » Fri Nov 16, 2018 4:56 pm

Yes, but that could caused by simply entering the wrong command, or because you're using a different version of python - the file is written for Python 3. If you can take a screenshot of those errors and post them here, I can tell you which is the case.
Ramapriya Rangaraju
Kentucky Quiz Bowl Alliance
University of Louisville
duPont Manual High School
Birdofredum Sawin wrote:If you don't want to be regarded as a "raving lunatic," it might be advisable to rave less, or at least to do so in a less loony manner.

sgoebel
Lulu
Posts: 34
Joined: Sat Mar 11, 2017 9:44 pm
Location: Shreveport, LA

Re: Neg5 to SQBS Parser

Post by sgoebel » Fri Nov 16, 2018 8:49 pm

If you have both python3 and python2 installed on your computer, you might need to type:

Code: Select all

python3 obj_parser.py HIT.qbj HITSET.json
If you're using windows, and you've installed python3 only, you can just use:

Code: Select all

python obj_parser.py HIT.qbj HITSET.json 
Make sure that you are in the proper directory before you run this command. On a Mac, in the terminal use

Code: Select all

ls
to show the contents of your current directory and

Code: Select all

cd folder_name_goes_here
to navigate to the proper folder. Use

Code: Select all

cd ..
to go up a folder level. In windows, you can use the same commands in powershell (use search from the start menu to find powershell) to navigate through the file structure. I believe you can also right click whatever folder all of your files are in and select something along the lines of "open in command prompt" or "open in powershell".

All of this assumes you added python to your PATH. If you haven't, any python or python3 command in cmd, powershell, terminal, or whatever you are using will give you a syntax error.
Stephen Goebel
Coach, C.E. Byrd High School, Shreveport, LA

jonah
Auron
Posts: 2258
Joined: Thu Jul 20, 2006 5:51 pm
Location: Chicago

Re: Neg5 to SQBS Parser

Post by jonah » Fri Nov 16, 2018 9:30 pm

Here's the SQBS file for the varsity division (with several TUH errors fixed?, some mentioned in the e-mail I sent you and some I caught after that).
Attachments
2018-hoover.sqbs
(53.46 KiB) Downloaded 9 times
Jonah Greenthal
National Academic Quiz Tournaments

Post Reply