Neg5 to SQBS Parser

Packet databases and other quizbowl sites, apps, or software should be discussed here.
Post Reply
User avatar
Father of the Ragdoll
Rikku
Posts: 270
Joined: Mon Apr 03, 2017 11:11 pm
Location: Austin, Texas

Neg5 to SQBS Parser

Post by Father of the Ragdoll »

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.
Brad Maclaine, McLain
(they/them)
The University of Texas at Austin - Ph.D. Human Development and Family Sciences, 202X; M.S. Social Work, 2021
University of Illinois at Urbana-Champaign - B.S. Psychology, 2019
Rockford Auburn High School - 2015
sgoebel
Lulu
Posts: 40
Joined: Sat Mar 11, 2017 9:44 pm
Location: Shreveport, LA

Re: Neg5 to SQBS Parser

Post by sgoebel »

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 HS 2013-2020
Unaffiliated, Caddo Magnet HS 2020-
User avatar
Father of the Ragdoll
Rikku
Posts: 270
Joined: Mon Apr 03, 2017 11:11 pm
Location: Austin, Texas

Re: Neg5 to SQBS Parser

Post by Father of the Ragdoll »

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
Brad Maclaine, McLain
(they/them)
The University of Texas at Austin - Ph.D. Human Development and Family Sciences, 202X; M.S. Social Work, 2021
University of Illinois at Urbana-Champaign - B.S. Psychology, 2019
Rockford Auburn High School - 2015
User avatar
AGoodMan
Rikku
Posts: 372
Joined: Sat Dec 20, 2014 10:25 pm

Re: Neg5 to SQBS Parser

Post by AGoodMan »

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 High School '16
Harvard '20
sgoebel
Lulu
Posts: 40
Joined: Sat Mar 11, 2017 9:44 pm
Location: Shreveport, LA

Re: Neg5 to SQBS Parser

Post by sgoebel »

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 HS 2013-2020
Unaffiliated, Caddo Magnet HS 2020-
Joshua Rutsky
Tidus
Posts: 663
Joined: Mon Oct 24, 2005 9:59 am
Location: Hoover, AL

Re: Neg5 to SQBS Parser

Post by Joshua Rutsky »

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
VP for Curriculum and Camp Operations, Qwiz
ASCA Board Member
Hoover High School Coach (Retired)
User avatar
sephirothrr
Quizbowl Detective Extraordinaire
Posts: 210
Joined: Sun Mar 23, 2008 11:00 pm
Location: Louisville, KY

Re: Neg5 to SQBS Parser

Post by sephirothrr »

Can you post the errors that you're getting? It's likely that you may have the wrong version of python installed.
Ramapriya
Kentucky Quizbowl Alliance
University of Louisville
duPont Manual High School
Birdofredum Sawin wrote: Fri Apr 04, 2014 1:52 pmIf 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: 663
Joined: Mon Oct 24, 2005 9:59 am
Location: Hoover, AL

Re: Neg5 to SQBS Parser

Post by Joshua Rutsky »

All of the errors I get are syntax errors.
Joshua Rutsky
VP for Curriculum and Camp Operations, Qwiz
ASCA Board Member
Hoover High School Coach (Retired)
User avatar
sephirothrr
Quizbowl Detective Extraordinaire
Posts: 210
Joined: Sun Mar 23, 2008 11:00 pm
Location: Louisville, KY

Re: Neg5 to SQBS Parser

Post by sephirothrr »

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
Kentucky Quizbowl Alliance
University of Louisville
duPont Manual High School
Birdofredum Sawin wrote: Fri Apr 04, 2014 1:52 pmIf 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: 40
Joined: Sat Mar 11, 2017 9:44 pm
Location: Shreveport, LA

Re: Neg5 to SQBS Parser

Post by sgoebel »

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 HS 2013-2020
Unaffiliated, Caddo Magnet HS 2020-
jonah
Auron
Posts: 2383
Joined: Thu Jul 20, 2006 5:51 pm
Location: Chicago

Re: Neg5 to SQBS Parser

Post by jonah »

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 210 times
Jonah Greenthal
National Academic Quiz Tournaments
Post Reply