climu / openstudyroom

Website for the Open Study Room online go/baduk/weiqi community.
https://openstudyroom.org
GNU General Public License v3.0
67 stars 33 forks source link

Non square boards would break scraper #468

Open climu opened 2 years ago

climu commented 2 years ago

We should change have a way to check if board size is square. At the moment a non square board would raise such:

  File "/openstudyroom/league/models.py", line 521, in parse
    prop = utils.parse_sgf_string(self.sgf_text)
  File "/openstudyroom/league/utils.py", line 175, in parse_sgf_string
    out['board_size'] = int(out['board_size'])
ValueError: invalid literal for int() with base 10: '19:9'