srhinos / primelooter

A small python bot which automatically claims amazon prime gaming loot :D
GNU General Public License v3.0
50 stars 3 forks source link

[BUG] 'NoneType' object is not subscriptable #48

Closed Gravitrax39 closed 8 months ago

Gravitrax39 commented 8 months ago

Describe the bug When i run the looter, it seems to be unable to function. honestly i dont really understand why, i didnt change anything when the bug showed up, so im unsure of what could be causing this.

📝To Reproduce Steps to reproduce the behavior:

  1. open command window
  2. use command "python C:\Users\name\Documents\primelooter-1.3.9\primelooter.py --cookies C:\Users\name\Documents\primelooter-1.3.9\Paths\cookie.txt --publishers C:\Users\name\Documents\primelooter-1.3.9\Paths\publishers.txt --loop"
  3. See error

🔎Expected behavior Expected primelooter to run as normal

☑️Check List

⚙️Environment Details(please complete the following information):

💬Additional context What i see in the cmd window

C:\Users\name\Documents\primelooter-1.3.9>python C:\Users\name\Documents\primelooter-1.3.9\primelooter.py --cookies C:\Users\name\Documents\primelooter-1.3.9\Paths\cookie.txt --publishers C:\Users\name\Documents\primelooter-1.3.9\Paths\publishers.txt --loop 2024-02-15 11:52:51 [INFO] Starting Prime Looter

2024-02-15 11:52:53 [ERROR] 'NoneType' object is not subscriptable File "C:\Users\name\Documents\primelooter-1.3.9\primelooter.py", line 143, in use_experimental_api(cookie_file) File "C:\Users\name\Documents\primelooter-1.3.9\primelooter.py", line 53, in use_experimental_api asyncio.run(primelooter(cookie_file)) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64qbz5n2kfra8p0\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 685, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\name\Documents\primelooter-1.3.9\experiment.py", line 69, in primelooter coros = await asyncio.gather( # noqa: F841 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\name\Documents\primelooter-1.3.9\experiment.py", line 21, in claim_offer if not item["offers"][0]["offerSelfConnection"]["eligibility"]["isClaimed"]:



[primelooter.log](https://github.com/srhinos/primelooter/files/14300581/primelooter.log)
srhinos commented 8 months ago

Not able to reproduce this locally or in Docker.

You should validate your cookies file is still valid and potentially recreate it.

srhinos commented 8 months ago

ehh, I'll leave this open. Let me know if its still an issue after going recreating your cookies file.

Gravitrax39 commented 8 months ago

Hey you were right! thanks for the quick response. i got the new cookies file and its working great now! thank you!

srhinos commented 8 months ago

no worries!