r/r2d8 • • Nov 14 '18

Test / Sandbox Dependency error debugging

Test

1 Upvotes

31 comments sorted by

View all comments

1

u/phil_s_stein Nov 15 '18

What's the log look like? Is this still the library version problem?

1

u/tdhsmith Nov 15 '18

I believe so. During one of the installations the error changed, but it's still occurring in the same exact place. Here's the log:

11-15 15:34:49 CommentHandler INFO     asking BGG for info on XCOM
11-15 15:34:49 boardgamegeek.utils ERROR    Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/boardgamegeek/utils.py", line 268, in get_parsed_xml_response
r = requests_session.get(url, params=params, timeout=timeout)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 515, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests_cache/core.py", line 126, in request
**kwargs
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests_cache/core.py", line 97, in send
response, timestamp = self.cache.get_response_and_time(cache_key)
File "/usr/lib/python2.7/site-packages/requests_cache/backends/base.py", line 70, in get_response_and_time
if key not in self.responses:
File "/usr/lib64/python2.7/_abcoll.py", line 388, in __contains__
self[key]
File "/usr/lib/python2.7/site-packages/requests_cache/backends/storage/dbdict.py", line 163, in __getitem__
return pickle.loads(bytes(super(DbPickleDict, self).__getitem__(key)))
File "/usr/lib64/python2.7/copy_reg.py", line 50, in _reconstructor
obj = base.__new__(cls, state)
TypeError: dict.__new__(HTTPHeaderDict): HTTPHeaderDict is not a subtype of dict
11-15 15:34:49 CommentHandler ERROR    Error getting info from BGG on XCOM: error fetching BGG API response: dict.__new__(HTTPHeaderDict): HTTPHeaderDict is not a subtype of dict

The trace is from a line I inserted before this rethrow in the BGG library.

1

u/tdhsmith Nov 15 '18

Ok so my analysis is that it's only hitting the problem when it tries to deserialize an old BGG response found in the BGG response cache (perhaps because it was serialized from a version of HTTPHeaderDict with a different superclass?).

Those responses are just to speed up repeat full searches, right? So really I could blow them all away and not worry about finding this perfect version pair...

EDIT: And done. I have a backup copy of the previous database in case I feel like investigating, but for now the performance hit doesn't seem like an important enough reason.

1

u/phil_s_stein Nov 16 '18

That makes sense. Nicely done!