Rolv-Arild / python-ballchasing

Python wrapper for the ballchasing.com API
MIT License
17 stars 6 forks source link

Uploading Replay File, NOT a replay file? #3

Open gitagogaming opened 2 years ago

gitagogaming commented 2 years ago

Heya, first off want to say thank you for making this module and sharing it.

I am trying to set this up tonight to upload a replay and give me back a response when its done but am having an issue where its saying this is not a replay file, even though it 100% is...

also can't seem to get any replay groups... getting an exact replay file works ok though


  File "c:\Users\dbcoo\Desktop\My_Application\Rocket League Python SoS\utils\replay_upload.py", line 26, in <module>
    print(api.upload_replay(replay_file=rf"C:\Users\dbcoo\Documents\My Games\Rocket League\TAGame\Demos\5C7EFE624F64367602088BA7D7BB45E8.replay"))
  File "C:\Users\dbcoo\AppData\Local\Programs\Python\Python39\lib\site-packages\ballchasing\api.py", line 207, in upload_replay
    return self._request(f"/v2/upload", self._session.post, files={"file": replay_file},
  File "C:\Users\dbcoo\AppData\Local\Programs\Python\Python39\lib\site-packages\ballchasing\api.py", line 82, in _request
    raise ValueError(r, r.json())
ValueError: (<Response [400]>, {'chat': {'Buzz': 'gg.', 'YOU': 'Whoops'}, 'error': '"file" not a .replay file', 'request_id': '473DAEC9:CD20_0A47005F:01BB_6225959B_233820A:2ECF0E', 'server': 'minion4'})
Rolv-Arild commented 2 years ago

This seems like the problem comes from the ballchasing website. Did you try uploading that replay through the website?