reddit-place-script-2022
reddit-place-script-2022 copied to clipboard
[BUG] only first account in list works
Bug Report Form
Checklist
- [Y] I am using the latest version of the code.
- [Y] I am absolutely sure I read the README in its entirety.
- [Y] I have made sure this is not a duplicate issue.
- [Y] I have filled out this form correctly.
Describe the bug
so only the first account is placing pixels
config is just
{
"image_path": "image.png",
"image_start_coords": [*,*],
"thread_delay": 2,
"unverified_place_frequency": "False",
"workers": {
"******": {
"password": "******",
"client_id": "******",
"client_secret": "******",
"start_coords": [*,*]
},
"******": {
"password": "******",
"client_id": "******",
"client_secret": "******",
"start_coords": [*,*],
"thread_delay": 2,
"unverified_place_frequency": "False"
}
}
}
but then the second account wont run, ive checked that the clientid and client secret are correct and i know the password is
2022-04-03 01:05:48.344 | INFO | __main__:load_image:114 - Loaded image size: (76, 47)
2022-04-03 01:05:49.352 | INFO | __main__:task:397 - Thread #0 ::
2022-04-03 01:05:49.353 | INFO | __main__:task:412 - Thread #0 :: Refreshing access token
2022-04-03 01:05:50.078 | INFO | __main__:task:464 - Received new access token: 94795************
2022-04-03 01:05:50.079 | INFO | __main__:get_board:184 - Getting board
2022-04-03 01:05:50.933 | INFO | __main__:get_board:300 - Got image:
2022-04-03 01:05:51.359 | INFO | __main__:task:397 - Thread #1 ::
2022-04-03 01:05:51.360 | INFO | __main__:task:412 - Thread #1 :: Refreshing access token
2022-04-03 01:05:52.261 | INFO | __main__:task:446 - An error occured. Make sure you have the correct credentials. Response data: {'error': 'in
2022-04-03 01:06:00.946 | INFO | __main__:get_board:184 - Getting board
2022-04-03 01:06:01.759 | INFO | __main__:get_board:300 - Got image:
2022-04-03 01:06:01.764 | INFO | __main__:task:494 -
Account Placing:
2022-04-03 01:06:01.765 | INFO | __main__:set_pixel_and_check_ratelimit:123 - Attempting to place Green (7) pixel at 1680, 910
2022-04-03 01:06:02.607 | ERROR | __main__:set_pixel_and_check_ratelimit:166 - Failed placing pixel: rate limited
2022-04-03 01:06:03.609 | INFO | __main__:task:397 - Thread #0 ::
2022-04-03 01:06:04.625 | INFO | __main__:task:397 - Thread #0 ::
To Reproduce
Steps to trigger the bug:
setup config similar to mine and run
Expected behavior
both accounts run on different threads
Hm based off the logs there is either an authentication error or rate limiting error associated with the second account.
I would suggest double checking the credentials for the second account in config.json.
semi-related, for the workers do you just create an account with the same username as a dev in the (https://www.reddit.com/prefs/apps) script?
ye i think it might be different usernames i just didnt know which one to use
but now im getting this
Exception in thread Thread-2:
Traceback (most recent call last):
File "D:\anaconda\lib\site-packages\requests\models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "D:\anaconda\lib\json\__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "D:\anaconda\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\anaconda\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\anaconda\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "D:\anaconda\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "d:/projects/rplace stuff/reddit-place-script-2022/main.py", line 443, in task
response_data = r.json()
File "D:\anaconda\lib\site-packages\requests\models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value]
<!doctype html>
<html><head><title>Ow! -- reddit.com</title>
<script type="text/javascript">
// send metric to our internal tracker.
function makeRequest(url, data) {
var dataString;
try {
dataString = JSON.stringify(data);
} catch (e) {
return false;
}
if (window.XMLHttpRequest) {
httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {}
}
}
if (!httpRequest) {
return false;
}
httpRequest.open('POST', url);
httpRequest.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
httpRequest.send(dataString);
}
makeRequest('https://stats.redditmedia.com', {cdnError:{error50x:1,}});
</script>
<style>
body{text-align:center;position:absolute;top:50%;margin:0;margin-top:-275px;width:100%}
h2,h3{color:#555;font:bold 200%/100px sans-serif;margin:0}
h3{color:#777;font:normal 150% sans-serif}
</style>
</head>
<img src=//redditstatic.s3.amazonaws.com/heavy-load.png alt="">
<h2>Our CDN was unable to reach our servers</h2>
Please check <a href="http://www.redditstatus.com/">www.redditstatus.com</a> if you consistently get this error.
: 1
ye i think it might be different usernames i just didnt know which one to use
but now im getting this
Exception in thread Thread-2: Traceback (most recent call last): File "D:\anaconda\lib\site-packages\requests\models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "D:\anaconda\lib\json\__init__.py", line 357, in loads return _default_decoder.decode(s) File "D:\anaconda\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\anaconda\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\anaconda\lib\threading.py", line 932, in _bootstrap_inner self.run() File "D:\anaconda\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "d:/projects/rplace stuff/reddit-place-script-2022/main.py", line 443, in task response_data = r.json() File "D:\anaconda\lib\site-packages\requests\models.py", line 917, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value] <!doctype html> <html><head><title>Ow! -- reddit.com</title> <script type="text/javascript"> // send metric to our internal tracker. function makeRequest(url, data) { var dataString; try { dataString = JSON.stringify(data); } catch (e) { return false; } if (window.XMLHttpRequest) { httpRequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!httpRequest) { return false; } httpRequest.open('POST', url); httpRequest.setRequestHeader('Content-Type', 'application/json; charset=utf-8'); httpRequest.send(dataString); } makeRequest('https://stats.redditmedia.com', {cdnError:{error50x:1,}}); </script> <style> body{text-align:center;position:absolute;top:50%;margin:0;margin-top:-275px;width:100%} h2,h3{color:#555;font:bold 200%/100px sans-serif;margin:0} h3{color:#777;font:normal 150% sans-serif} </style> </head> <img src=//redditstatic.s3.amazonaws.com/heavy-load.png alt=""> <h2>Our CDN was unable to reach our servers</h2> Please check <a href="http://www.redditstatus.com/">www.redditstatus.com</a> if you consistently get this error. : 1
this is reported in #171, reddit's api is down rn
2022-04-03 07:14:47.070 | INFO | __main__:task:397 - Thread #3 :: 1030.0 seconds until next pixel is drawn
2022-04-03 07:14:47.162 | INFO | __main__:get_board:300 - Got image:
2022-04-03 07:14:47.166 | INFO | __main__:task:494 -
Account Placing:
2022-04-03 07:14:47.166 | INFO | __main__:set_pixel_and_check_ratelimit:123 - Attempting to place White (31) pixel at 1595, 533
2022-04-03 07:14:47.579 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:47.579 | INFO | __main__:get_board:184 - Getting board
2022-04-03 07:14:48.032 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:48.071 | INFO | __main__:task:397 - Thread #3 :: 1030.0 seconds until next pixel is drawn
2022-04-03 07:14:48.238 | INFO | __main__:set_pixel_and_check_ratelimit:173 - Succeeded placing pixel
2022-04-03 07:14:49.034 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:49.073 | INFO | __main__:task:397 - Thread #3 :: 1030.0 seconds until next pixel is drawn
2022-04-03 07:14:49.239 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:49.706 | INFO | __main__:get_board:300 - Got image:
2022-04-03 07:14:49.709 | INFO | __main__:task:494 -
Account Placing:
2022-04-03 07:14:49.709 | INFO | __main__:set_pixel_and_check_ratelimit:123 - Attempting to place White (31) pixel at 1595, 533
2022-04-03 07:14:50.035 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:50.074 | INFO | __main__:task:397 - Thread #3 :: 1030.0 seconds until next pixel is drawn
2022-04-03 07:14:50.240 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:50.758 | INFO | __main__:set_pixel_and_check_ratelimit:173 - Succeeded placing pixel
2022-04-03 07:14:51.037 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:51.075 | INFO | __main__:task:397 - Thread #3 :: 1030.0 seconds until next pixel is drawn
2022-04-03 07:14:51.242 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:51.759 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:52.038 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:52.077 | INFO | __main__:task:397 - Thread #3 :: 1030.0 seconds until next pixel is drawn
2022-04-03 07:14:52.243 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:52.761 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:53.039 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:53.078 | INFO | __main__:task:397 - Thread #3 :: 1020.0 seconds until next pixel is drawn
2022-04-03 07:14:53.244 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:53.762 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:54.040 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:54.079 | INFO | __main__:task:397 - Thread #3 :: 1020.0 seconds until next pixel is drawn
2022-04-03 07:14:54.246 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:54.763 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:55.042 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:55.081 | INFO | __main__:task:397 - Thread #3 :: 1020.0 seconds until next pixel is drawn
2022-04-03 07:14:55.247 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:55.765 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:56.043 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:56.082 | INFO | __main__:task:397 - Thread #3 :: 1020.0 seconds until next pixel is drawn
2022-04-03 07:14:56.248 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:56.766 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:57.044 | INFO | __main__:task:397 - Thread #0 :: 880.0 seconds until next pixel is drawn
2022-04-03 07:14:57.083 | INFO | __main__:task:397 - Thread #3 :: 1020.0 seconds until next pixel is drawn
2022-04-03 07:14:57.250 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:14:57.767
this is stuck at the same pixel and using only the first cell
2022-04-03 07:19:50.201 | INFO | __main__:get_board:184 - Getting board
2022-04-03 07:19:50.471 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:50.510 | INFO | __main__:task:397 - Thread #3 :: 730.0 seconds until next pixel is drawn
2022-04-03 07:19:51.394 | INFO | __main__:get_board:300 - Got image:
2022-04-03 07:19:51.399 | INFO | __main__:task:494 -
Account Placing:
2022-04-03 07:19:51.399 | INFO | __main__:set_pixel_and_check_ratelimit:123 - Attempting to place White (31) pixel at 1597, 533
2022-04-03 07:19:51.472 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:51.511 | INFO | __main__:task:397 - Thread #3 :: 730.0 seconds until next pixel is drawn
2022-04-03 07:19:52.410 | INFO | __main__:get_board:300 - Got image:
2022-04-03 07:19:52.414 | INFO | __main__:task:494 -
Account Placing:
2022-04-03 07:19:52.414 | INFO | __main__:set_pixel_and_check_ratelimit:123 - Attempting to place White (31) pixel at 1597, 533
2022-04-03 07:19:52.474 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:52.502 | INFO | __main__:set_pixel_and_check_ratelimit:173 - Succeeded placing pixel
2022-04-03 07:19:52.512 | INFO | __main__:task:397 - Thread #3 :: 730.0 seconds until next pixel is drawn
2022-04-03 07:19:53.475 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:53.503 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:53.514 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:19:53.556 | INFO | __main__:set_pixel_and_check_ratelimit:173 - Succeeded placing pixel
2022-04-03 07:19:54.477 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:54.504 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:54.515 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:19:54.558 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:55.478 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:55.505 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:55.516 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:19:55.559 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:56.479 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:56.507 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:56.518 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:19:56.561 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:57.481 | INFO | __main__:task:397 - Thread #0 :: 580.0 seconds until next pixel is drawn
2022-04-03 07:19:57.508 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:57.519 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:19:57.562 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:58.482 | INFO | __main__:task:397 - Thread #0 :: 570.0 seconds until next pixel is drawn
2022-04-03 07:19:58.509 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:58.521 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:19:58.563 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:59.483 | INFO | __main__:task:397 - Thread #0 :: 570.0 seconds until next pixel is drawn
2022-04-03 07:19:59.511 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:19:59.522 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:19:59.565 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:20:00.485 | INFO | __main__:task:397 - Thread #0 :: 570.0 seconds until next pixel is drawn
2022-04-03 07:20:00.512 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:20:00.523 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:20:00.566 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:20:01.486 | INFO | __main__:task:397 - Thread #0 :: 570.0 seconds until next pixel is drawn
2022-04-03 07:20:01.514 | INFO | __main__:task:397 - Thread #1 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:20:01.524 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:20:01.567 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:20:02.487 | INFO | __main__:task:397 - Thread #0 :: 570.0 seconds until next pixel is drawn
2022-04-03 07:20:02.515 | INFO | __main__:task:397 - Thread #1 :: 290.0 seconds until next pixel is drawn
2022-04-03 07:20:02.526 | INFO | __main__:task:397 - Thread #3 :: 720.0 seconds until next pixel is drawn
2022-04-03 07:20:02.568 | INFO | __main__:task:397 - Thread #2 :: 0.0 seconds until next pixel is drawn
2022-04-03 07:20:03.489 | INFO | __main__:task:397 - Thread #0 :: 570.0 seconds until next pixel is drawn
2022-04-03 07:20:03.516 | INFO | __main__:task:397 - Thread #1 :: 290.0 seconds until next pixel is drawn
2022-04-03 07:20:03.527 | INFO | __main__:task:397 - Thread #3 :: 710.0 seconds until next pixel is drawn
2022-04-03 07:20:03.570 | INFO | __main__:task:397 - Thread #2 :: 290.0 seconds until next pixel is drawn
2022-04-03 07:20:04.490 | INFO | __main__:task:397 - Thread #0 :: 570.0 seconds until next pixel is drawn
2022-04-03 07:20:04.518 | INFO | __main__:task:397 - Thread #1 :: 290.0 seconds until next pixel is drawn
Hello, are you still encountering this issue with the latest code?