EmilStenstrom / mybgg

A template that lets you quickly set up a site for searching and filtering your boardgames.
https://games.emilstenstrom.se
MIT License
61 stars 132 forks source link

Getting this error when trying to import a big collection #12

Closed lajlev closed 6 years ago

lajlev commented 6 years ago

I'm trying to create a collection for one of my BG buddies https://boardgamegeek.com/user/kinkymachine

Getting this error

Imported 99 games from boardgamegeek.
Traceback (most recent call last):
  File "download_and_index.py", line 273, in <module>
    main(args)
  File "download_and_index.py", line 244, in main
    indexer.add_objects(collection)
  File "download_and_index.py", line 214, in add_objects
    self.index.add_objects(games)
  File "/usr/local/lib/python3.6/site-packages/algoliasearch/index.py", line 119, in add_objects
    return self.batch(requests, request_options=request_options)
  File "/usr/local/lib/python3.6/site-packages/algoliasearch/index.py", line 1025, in batch
    return self._req(False, '/batch', 'POST', request_options, data=requests)
  File "/usr/local/lib/python3.6/site-packages/algoliasearch/index.py", line 1128, in _req
    return self.client._req(is_search, path, meth, request_options, params, data)
  File "/usr/local/lib/python3.6/site-packages/algoliasearch/client.py", line 697, in _req
    return self._transport.req(is_search, path, meth, params, data, request_options)
  File "/usr/local/lib/python3.6/site-packages/algoliasearch/transport.py", line 176, in req
    raise e
  File "/usr/local/lib/python3.6/site-packages/algoliasearch/transport.py", line 174, in req
    return r(host, path, meth, timeout, params, data, headers)
  File "/usr/local/lib/python3.6/site-packages/algoliasearch/transport.py", line 120, in _session_req
    raise AlgoliaException(message)
algoliasearch.helpers.AlgoliaException: Record at the position 46 objectID=bgg699 is too big size=10770 bytes. Contact us if you need an extended quota
EmilStenstrom commented 6 years ago

Interesting! I got that error when I included to much text from BGG in each search result. Some questions before digging deeper into this: Do this user have a game with a lot of expansions? Which game? Is there a game with a HUGE description field somewhere?

EmilStenstrom commented 6 years ago

Oh, the error message actually says which object it is: "bgg699". Which is https://boardgamegeek.com/boardgame/699/ which in turn redirects to Heroquest. That game indeed has a HUGE description field. I'll have a look at this later this week. Thanks for reporting!

EmilStenstrom commented 6 years ago

Hi again. Could you verify that everything works with the latest version of mybgg?

lajlev commented 6 years ago

Seem to works.

lajlev commented 6 years ago

Good job 👍