reddit-place-script-2022
reddit-place-script-2022 copied to clipboard
[BUG] KeyError: 'extensions'
Bug Report Form
Checklist
- [ ] I am using the latest version of the code.
- [ ] I am absolutely sure I read the README in its entirety.
- [ ] I have made sure this is not a duplicate issue.
- [ ] I have filled out this form correctly.
Describe the bug
all my accounts authorize but I still get this error:
Exception in thread Thread-4 (task): Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\threading.py", line 1009, in _bootstrap_inner self.run() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\threading.py", line 946, in run self._target(*self._args, **self._kwargs) File "C:\Users\trish\Desktop\reddit-place-script-2022-main\main.py", line 712, in task next_pixel_placement_time = self.set_pixel_and_check_ratelimit( File "C:\Users\trish\Desktop\reddit-place-script-2022-main\main.py", line 269, in set_pixel_and_check_ratelimit response.json()["errors"][0]["extensions"]["nextAvailablePixelTs"] KeyError: 'extensions'
To Reproduce
Steps to trigger the bug:
- select path
- Run start.bat
- See error
Expected behavior
Replace this text with what should have happened if no bug occurred.
Additional context
{ "image_path": "C:\Users\trish\Pictures\Purplecom.jpg", "image_start_coords": [864, 1402], "thread_delay": 2, "unverified_place_frequency": false, "compact_logging": true, "workers": { "Account": { "password": "password", "start_coords": [0, 0] }, "Account": { "password": "password", "start_coords": [0, 0] }, "Account": { "password": "password", "start_coords": [0, 0] }, "Account": { "password": "password", "start_coords": [0, 0] }
This only happens at the most recently added canvas
Can we see an extract of the logs before the exception?
I am having the same issue, if it's any help these are my logs:
2022-04-04 00:18:07.657 | INFO | main:load_image:212 - Converted to rgba 2022-04-04 00:18:07.658 | INFO | main:load_image:215 - Loaded image size: (7, 5) 2022-04-04 00:18:09.494 | SUCCESS | main:task:653 - Authorization successful! 2022-04-04 00:18:09.495 | INFO | main:task:654 - Obtaining access token... 2022-04-04 00:18:16.673 | INFO | main:task:712 - Account Placing: 2022-04-04 00:18:16.675 | INFO | main:set_pixel_and_check_ratelimit:228 - Thread #0 : Attempting to place White (31) pixel at 1748, 207 Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\Bruce kristelijn\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\Bruce kristelijn\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "main.py", line 727, in task next_pixel_placement_time = self.set_pixel_and_check_ratelimit( File "main.py", line 274, in set_pixel_and_check_ratelimit response.json()["errors"][0]["extensions"]["nextAvailablePixelTs"] KeyError: 'extensions'
Could you run that with the --debug
flag on?
I am having the same issue.
Exception in thread Thread-6 (task): Traceback (most recent call last): File "C:\Users\P\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner self.run() File "C:\Users\P\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run self._target(*self._args, **self._kwargs) File "C:\Users\P\Desktop\bot\main.py", line 712, in task next_pixel_placement_time = self.set_pixel_and_check_ratelimit( File "C:\Users\P\Desktop\bot\main.py", line 269, in set_pixel_and_check_ratelimit response.json()["errors"][0]["extensions"]["nextAvailablePixelTs"] KeyError: 'extensions'
Could you run that with the
--debug
flag on?
2022-04-04 00:38:41.918 | INFO | main:load_image:217 - Converted to rgba 2022-04-04 00:38:41.919 | INFO | main:load_image:220 - Loaded image size: (7, 5) 2022-04-04 00:38:43.412 | DEBUG | main:GetRandomProxy:182 - Using proxy: None 2022-04-04 00:38:43.749 | SUCCESS | main:task:659 - Authorization successful! 2022-04-04 00:38:43.751 | INFO | main:task:660 - Obtaining access token... 2022-04-04 00:38:46.454 | DEBUG | main:get_board:302 - Connecting and obtaining board images 2022-04-04 00:38:47.043 | DEBUG | main:get_board:330 - Connected to WebSocket server 2022-04-04 00:38:47.044 | DEBUG | main:get_board:332 - Obtaining Canvas information 2022-04-04 00:38:47.155 | DEBUG | main:get_board:359 - Canvas config: {'payload': {'data': {'subscribe': {'id': '830de053-3112-449f-b6de-198a7ac957c9', 'data': {'__typename': 'ConfigurationMessageData', 'colorPalette': {'colors': [{'hex': '#6D001A', 'index': 0, '__typename': 'Color'}, {'hex': '#BE0039', 'index': 1, '__typename': 'Color'}, {'hex': '#FF4500', 'index': 2, '__typename': 'Color'}, {'hex': '#FFA800', 'index': 3, '__typename': 'Color'}, {'hex': '#FFD635', 'index': 4, '__typename': 'Color'}, {'hex': '#FFF8B8', 'index': 5, '__typename': 'Color'}, {'hex': '#00A368', 'index': 6, '__typename': 'Color'}, {'hex': '#00CC78', 'index': 7, '__typename': 'Color'}, {'hex': '#7EED56', 'index': 8, '__typename': 'Color'}, {'hex': '#00756F', 'index': 9, '__typename': 'Color'}, {'hex': '#009EAA', 'index': 10, '__typename': 'Color'}, {'hex': '#00CCC0', 'index': 11, '__typename': 'Color'}, {'hex': '#2450A4', 'index': 12, '__typename': 'Color'}, {'hex': '#3690EA', 'index': 13, '__typename': 'Color'}, {'hex': '#51E9F4', 'index': 14, '__typename': 'Color'}, {'hex': '#493AC1', 'index': 15, '__typename': 'Color'}, {'hex': '#6A5CFF', 'index': 16, '__typename': 'Color'}, {'hex': '#94B3FF', 'index': 17, '__typename': 'Color'}, {'hex': '#811E9F', 'index': 18, '__typename': 'Color'}, {'hex': '#B44AC0', 'index': 19, '__typename': 'Color'}, {'hex': '#E4ABFF', 'index': 20, '__typename': 'Color'}, {'hex': '#DE107F', 'index': 21, '__typename': 'Color'}, {'hex': '#FF3881', 'index': 22, '__typename': 'Color'}, {'hex': '#FF99AA', 'index': 23, '__typename': 'Color'}, {'hex': '#6D482F', 'index': 24, '__typename': 'Color'}, {'hex': '#9C6926', 'index': 25, '__typename': 'Color'}, {'hex': '#FFB470', 'index': 26, '__typename': 'Color'}, {'hex': '#000000', 'index': 27, '__typename': 'Color'}, {'hex': '#515252', 'index': 28, '__typename': 'Color'}, {'hex': '#898D90', 'index': 29, '__typename': 'Color'}, {'hex': '#D4D7D9', 'index': 30, '__typename': 'Color'}, {'hex': '#FFFFFF', 'index': 31, '__typename': 'Color'}], '__typename': 'ColorPalette'}, 'canvasConfigurations': [{'index': 0, 'dx': 0, 'dy': 0, '__typename': 'CanvasConfiguration'}, {'index': 1, 'dx': 1000, 'dy': 0, '__typename': 'CanvasConfiguration'}, {'index': 2, 'dx': 0, 'dy': 1000, '__typename': 'CanvasConfiguration'}, {'index': 3, 'dx': 1000, 'dy': 1000, '__typename': 'CanvasConfiguration'}], 'canvasWidth': 1000, 'canvasHeight': 1000}, '__typename': 'BasicMessage'}}}, 'id': '1', 'type': 'data'} 2022-04-04 00:38:47.157 | DEBUG | main:get_board:368 - Creating canvas socket 2 2022-04-04 00:38:47.158 | DEBUG | main:get_board:368 - Creating canvas socket 3 2022-04-04 00:38:47.159 | DEBUG | main:get_board:368 - Creating canvas socket 4 2022-04-04 00:38:47.160 | DEBUG | main:get_board:368 - Creating canvas socket 5 2022-04-04 00:38:47.161 | DEBUG | main:get_board:394 - A total of 4 canvas sockets opened 2022-04-04 00:38:47.271 | DEBUG | main:get_board:398 - Waiting for WebSocket message 2022-04-04 00:38:47.272 | DEBUG | main:get_board:401 - Received WebSocket data type message 2022-04-04 00:38:47.272 | DEBUG | main:get_board:405 - Received full frame message 2022-04-04 00:38:47.274 | DEBUG | main:get_board:407 - Image ID: 3 2022-04-04 00:38:47.274 | DEBUG | main:get_board:410 - Getting image: https://hot-potato.reddit.com/media/canvas-images/1649025527382-1-f-pCEyWkHL.png 2022-04-04 00:38:47.276 | DEBUG | main:GetRandomProxy:182 - Using proxy: None 2022-04-04 00:38:47.640 | DEBUG | main:get_board:426 - Canvas sockets remaining: 3 2022-04-04 00:38:47.641 | DEBUG | main:get_board:398 - Waiting for WebSocket message 2022-04-04 00:38:47.642 | DEBUG | main:get_board:401 - Received WebSocket data type message 2022-04-04 00:38:47.643 | DEBUG | main:get_board:405 - Received full frame message 2022-04-04 00:38:47.644 | DEBUG | main:get_board:407 - Image ID: 2 2022-04-04 00:38:47.645 | DEBUG | main:get_board:410 - Getting image: https://hot-potato.reddit.com/media/canvas-images/1649025527252-0-f-MOaLwQxV.png 2022-04-04 00:38:47.646 | DEBUG | main:GetRandomProxy:182 - Using proxy: None 2022-04-04 00:38:47.931 | DEBUG | main:get_board:426 - Canvas sockets remaining: 2 2022-04-04 00:38:47.932 | DEBUG | main:get_board:398 - Waiting for WebSocket message 2022-04-04 00:38:47.933 | DEBUG | main:get_board:401 - Received WebSocket data type message 2022-04-04 00:38:47.934 | DEBUG | main:get_board:405 - Received full frame message 2022-04-04 00:38:47.934 | DEBUG | main:get_board:407 - Image ID: 4 2022-04-04 00:38:47.935 | DEBUG | main:get_board:410 - Getting image: https://hot-potato.reddit.com/media/canvas-images/1649025527428-2-f-gljP48BP.png 2022-04-04 00:38:47.937 | DEBUG | main:GetRandomProxy:182 - Using proxy: None 2022-04-04 00:38:48.242 | DEBUG | main:get_board:426 - Canvas sockets remaining: 1 2022-04-04 00:38:48.243 | DEBUG | main:get_board:398 - Waiting for WebSocket message 2022-04-04 00:38:48.244 | DEBUG | main:get_board:401 - Received WebSocket data type message 2022-04-04 00:38:48.245 | DEBUG | main:get_board:405 - Received full frame message 2022-04-04 00:38:48.246 | DEBUG | main:get_board:407 - Image ID: 5 2022-04-04 00:38:48.247 | DEBUG | main:get_board:410 - Getting image: https://hot-potato.reddit.com/media/canvas-images/1649025527248-3-f-Q1EDppUr.png 2022-04-04 00:38:48.248 | DEBUG | main:GetRandomProxy:182 - Using proxy: None 2022-04-04 00:38:48.574 | DEBUG | main:get_board:426 - Canvas sockets remaining: 0 2022-04-04 00:38:48.691 | DEBUG | main:get_board:439 - New image width: 2000 2022-04-04 00:38:48.692 | DEBUG | main:get_board:445 - New image height: 2000 2022-04-04 00:38:48.695 | DEBUG | main:get_board:450 - Adding image (ID 2): <PIL.PngImagePlugin.PngImageFile image mode=P size=1000x1000 at 0x53F68E0> 2022-04-04 00:38:48.701 | DEBUG | main:get_board:450 - Adding image (ID 3): <PIL.PngImagePlugin.PngImageFile image mode=P size=1000x1000 at 0x516A808> 2022-04-04 00:38:48.707 | DEBUG | main:get_board:450 - Adding image (ID 4): <PIL.PngImagePlugin.PngImageFile image mode=P size=1000x1000 at 0x53FBE80> 2022-04-04 00:38:48.714 | DEBUG | main:get_board:450 - Adding image (ID 5): <PIL.PngImagePlugin.PngImageFile image mode=P size=1000x1000 at 0x53FBEF8> 2022-04-04 00:38:48.724 | DEBUG | main:get_unset_pixel:500 - 1748, 207 2022-04-04 00:38:48.725 | DEBUG | main:get_unset_pixel:501 - 0, 0, boardimg, 7, 5 2022-04-04 00:38:48.726 | DEBUG | main:get_unset_pixel:509 - (255, 153, 170), (255, 255, 255), True, False 2022-04-04 00:38:48.727 | DEBUG | main:get_unset_pixel:518 - Thread #0 : Replacing (255, 153, 170) pixel at: 1748,207 with (255, 255, 255) color 2022-04-04 00:38:48.730 | INFO | main:task:718 - Account Placing: 2022-04-04 00:38:48.732 | INFO | main:set_pixel_and_check_ratelimit:233 - Thread #0 : Attempting to place White (31) pixel at 1748, 207 2022-04-04 00:38:48.733 | DEBUG | main:GetRandomProxy:182 - Using proxy: None 2022-04-04 00:38:49.211 | DEBUG | main:set_pixel_and_check_ratelimit:270 - Thread #0 : Received response: {"errors":[{"message":"user is not logged in","path":["act"]}],"data":null} 2022-04-04 00:38:49.213 | DEBUG | main:set_pixel_and_check_ratelimit:278 - [{'message': 'user is not logged in', 'path': ['act']}] Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\Bruce kristelijn\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\Bruce kristelijn\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "main.py", line 733, in task next_pixel_placement_time = self.set_pixel_and_check_ratelimit( File "main.py", line 280, in set_pixel_and_check_ratelimit response.json()["errors"][0]["extensions"]["nextAvailablePixelTs"] KeyError: 'extensions'
I can now see the user not logged in error hmm
Cloned fresh copy from github and it's working for some reason now.
Looks like we need to handle this login issue.