rhgrant10 / berserk

Python client for the lichess API
https://berserk.readthedocs.io
Other
141 stars 36 forks source link

ChunkedEncodingError While extracting the data #54

Open Laxman-Lakhan opened 1 year ago

Laxman-Lakhan commented 1 year ago

Description

I am extracting my chess games with this code for over a year, but just 2 hours ago I got this error.

What I Did

token = os.environ.get('TOKEN')
session = berserk.TokenSession(token)
client = berserk.Client(session=session)
extract = client.games.export_by_player('YourKingIsInDanger',
            as_pgn=False, since=None, until=None, max=None, vs=None, rated=True, 
            perf_type=None, color=None, analysed=None, moves=True, tags=True, 
            evals=False, opening=True)
data = list(extract)

ValueError: invalid literal for int() with base 16: b'' During handling of the above exception, another exception occurred:

InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read) During handling of the above exception, another exception occurred:

ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read)) During handling of the above exception, another exception occurred:

ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))