Windows200000 / TwitchDropsMiner-updated

An app that allows you to AFK mine timed Twitch drops, with automatic drop claiming and channel switching.
MIT License
337 stars 17 forks source link

Fatal Error: TypeError: string indices must be integers #164

Open axi92 opened 1 month ago

axi92 commented 1 month ago

Description

Crashed

To Reproduce

Occurred after a some time.

Expected behavior

Should not crash

Observed behavior

Stopped working

Screenshots

No response

Logs

01:16:02 PM: Fatal error encountered: 01:16:02 PM: 01:16:02 PM: Traceback (most recent call last): 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/main.py", line 160, in main 01:16:02 PM: await client.run() 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 772, in run 01:16:02 PM: await self._run() 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 817, in _run 01:16:02 PM: await self.fetch_inventory() 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 1670, in fetch_inventory 01:16:02 PM: chunk_campaigns_data = await chunk_coro 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/lib/python3.10/asyncio/tasks.py", line 571, in _wait_for_one 01:16:02 PM: return f.result() # May raise f.exception(). 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 1616, in fetch_campaigns 01:16:02 PM: fetched_data: dict[str, JsonType] = { 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 1617, in 01:16:02 PM: (campaign_data := response_json["data"]["user"]["dropCampaign"])["id"]: campaign_data 01:16:02 PM: TypeError: string indices must be integers 01:16:02 PM: 01:16:02 PM: Exiting... 01:16:03 PM: 01:16:03 PM: Application Terminated. 01:16:03 PM: Close the window to exit the application.01:16:02 PM: Fatal error encountered: 01:16:02 PM: 01:16:02 PM: Traceback (most recent call last): 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/main.py", line 160, in main 01:16:02 PM: await client.run() 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 772, in run 01:16:02 PM: await self._run() 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 817, in _run 01:16:02 PM: await self.fetch_inventory() 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 1670, in fetch_inventory 01:16:02 PM: chunk_campaigns_data = await chunk_coro 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/lib/python3.10/asyncio/tasks.py", line 571, in _wait_for_one 01:16:02 PM: return f.result() # May raise f.exception(). 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 1616, in fetch_campaigns 01:16:02 PM: fetched_data: dict[str, JsonType] = { 01:16:02 PM: File "/tmp/.mount_Twitchi99WGd/usr/src/twitch.py", line 1617, in 01:16:02 PM: (campaign_data := response_json["data"]["user"]["dropCampaign"])["id"]: campaign_data 01:16:02 PM: TypeError: string indices must be integers 01:16:02 PM: 01:16:02 PM: Exiting... 01:16:03 PM: 01:16:03 PM: Application Terminated. 01:16:03 PM: Close the window to exit the application.

OS

Ubuntu 22.04

Build

AppImage

Version/Commit

69d73bec3acd91ce27418d3ccb93b3728a6ef3d5

Additional context

No response

flamedance58 commented 1 month ago

I just got a similar case but much simpler form:

10:44:29: Fatal error encountered:
10:44:29: 
10:44:29: Traceback (most recent call last):
10:44:29:   File "main.py", line 160, in main
10:44:29:   File "twitch.py", line 772, in run
10:44:29:   File "twitch.py", line 817, in _run
10:44:29:   File "twitch.py", line 1670, in fetch_inventory
10:44:29:   File "asyncio\tasks.py", line 571, in _wait_for_one
10:44:29:   File "twitch.py", line 1616, in fetch_campaigns
10:44:29:   File "twitch.py", line 1617, in <dictcomp>
10:44:29: TypeError: string indices must be integers
10:44:29: 
10:44:29: Exiting...
10:44:30: 
10:44:30: Application Terminated.
10:44:30: Close the window to exit the application.
H6882 commented 1 month ago

I just got a similar case but much simpler form:

10:44:29: Fatal error encountered:
10:44:29: 
10:44:29: Traceback (most recent call last):
10:44:29:   File "main.py", line 160, in main
10:44:29:   File "twitch.py", line 772, in run
10:44:29:   File "twitch.py", line 817, in _run
10:44:29:   File "twitch.py", line 1670, in fetch_inventory
10:44:29:   File "asyncio\tasks.py", line 571, in _wait_for_one
10:44:29:   File "twitch.py", line 1616, in fetch_campaigns
10:44:29:   File "twitch.py", line 1617, in <dictcomp>
10:44:29: TypeError: string indices must be integers
10:44:29: 
10:44:29: Exiting...
10:44:30: 
10:44:30: Application Terminated.
10:44:30: Close the window to exit the application.

Got the same error, disabling SMITE fixed mine (leaving only Overwatch, Rust, and The Finals enabled). SMITE currently has two campaigns running which might be what causes the error. The non-weekly campaign will be completed for me shortly, then I'll test if the error still occurs.