placenl2022 / rplace2022 Goto Github PK
View Code? Open in Web Editor NEWPython version of PlaceNL's headless bot with automatic access token refresh
License: MIT License
Python version of PlaceNL's headless bot with automatic access token refresh
License: MIT License
Een reconnect zorgt ervoor dat het script crash.
INFO [PlaceNL.cnc] Notified CNC server of drawn pixel. PlaceNL.py:198
[04/03/22 12:52:29] WARNING [PlaceNL.cnc] Connection to C&C websocket lost, trying again in one minute... PlaceNL.py:504
[04/03/22 12:52:31] ERROR [asyncio] Task exception was never retrieved base_events.py:1753
future: <Task finished name='Task-2996' coro=<CNCOrderClient.ping() done, defined at
C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\PlaceNL.py:155> exception=ConnectionResetError('Cannot write to closing transport')>
Traceback (most recent call last):
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\PlaceNL.py", line 158, in ping
await self.ws.send_str(json.dumps({"type": "ping"}))
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\venv\lib\site-packages\aiohttp\client_ws.py", line 151, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\venv\lib\site-packages\aiohttp\http_websocket.py", line 690, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\venv\lib\site-packages\aiohttp\http_websocket.py", line 601, in _send_frame
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
Traceback (most recent call last):
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\PlaceNL.py", line 581, in <module>
asyncio.run(main())
File "C:\Users\media\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\media\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\PlaceNL.py", line 579, in main
await asyncio.gather(*tasks)
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\PlaceNL.py", line 502, in cnc_update_task
await cnc_client.receive_orders()
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\PlaceNL.py", line 165, in receive_orders
await self.ws.send_str(json.dumps({"type": "getmap"}))
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\venv\lib\site-packages\aiohttp\client_ws.py", line 151, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\venv\lib\site-packages\aiohttp\http_websocket.py", line 690, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File "C:\Users\media\Desktop\PlaceNL\Python\rPlace2022\venv\lib\site-packages\aiohttp\http_websocket.py", line 601, in _send_frame
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
Krijg op meerdere systemen eens in de zovel tijd de volgende error
2 22:24:10] ERROR [PlaceNL.cnc] Could not send ping, websocket closed? PlaceNL.py:201
Traceback (most recent call last):
File "/home/[redacted]/build/rplace/placenl/lib/python3.9/site-packages/PlaceNL.py", line 199, in ping
await self.ws.send_str(json.dumps({"type": "ping"}))
File "/home/[redacted]/build/rplace/placenl/lib/python3.9/site-packages/aiohttp/client_ws.py", line 151, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "/home/[redacted]/build/rplace/placenl/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 690, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File "/home/[redacted]/build/rplace/placenl/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 601, in _send_frame
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
Is deze inmiddels bekend?
File "/usr/local/bin/PlaceNL", line 8, in <module>
sys.exit(run())
File "/usr/local/lib/python3.10/site-packages/PlaceNL.py", line 648, in run
asyncio.run(main())
File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/usr/local/lib/python3.10/site-packages/PlaceNL.py", line 644, in main
await asyncio.gather(*tasks)
File "/usr/local/lib/python3.10/site-packages/PlaceNL.py", line 593, in reddit_client
to_update = place_client.get_pixels_to_update(self.order_map)
File "/usr/local/lib/python3.10/site-packages/PlaceNL.py", line 453, in get_pixels_to_update
if not numpy.array_equal(order_map[row, col, :3], self.current_canvas[row, col, :3]):
IndexError: index 1949 is out of bounds for axis 0 with size 1000```
Traceback (most recent call last):
File "/home/pi/./PlaceNL.py", line 693, in
run()
File "/home/pi/./PlaceNL.py", line 689, in run
asyncio.run(main())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/pi/./PlaceNL.py", line 685, in main
await asyncio.gather(*tasks)
File "/home/pi/./PlaceNL.py", line 628, in reddit_client
await place_client.load_full_map()
File "/home/pi/./PlaceNL.py", line 454, in load_full_map
canvas4 = await self.load_canvas(3)
File "/home/pi/./PlaceNL.py", line 393, in load_canvas
async with self.session.ws_connect(PLACE_WEBSOCKET, protocols=["graphql-ws"], headers=headers) as ws:
File "/home/pi/.local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in aenter
self._resp = await self._coro
File "/home/pi/.local/lib/python3.9/site-packages/aiohttp/client.py", line 776, in _ws_connect
resp = await self.request(
File "/home/pi/.local/lib/python3.9/site-packages/aiohttp/client.py", line 559, in _request
await resp.start(conn)
File "/home/pi/.local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 898, in start
message, payload = await protocol.read() # type: ignore[union-attr]
File "/home/pi/.local/lib/python3.9/site-packages/aiohttp/streams.py", line 616, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
Traceback (most recent call last):
File "/home/sam/placeNL/rPlace2022/PlaceNL.py", line 616, in
run()
File "/home/sam/placeNL/rPlace2022/PlaceNL.py", line 612, in run
asyncio.run(main())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/sam/placeNL/rPlace2022/PlaceNL.py", line 603, in main
await asyncio.gather(*tasks)
File "/home/sam/placeNL/rPlace2022/PlaceNL.py", line 530, in reddit_client_task
async with RedditPlaceClient(session, username, password, user_agent) as place_client:
File "/home/sam/placeNL/rPlace2022/PlaceNL.py", line 238, in aenter
raise Exception("Could not obtain access token.")
Exception: Could not obtain access token.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.