Giter VIP home page Giter VIP logo

headless-henk's People

Contributors

ebosveld avatar mechoriet avatar nilsbebelaar avatar rubennl avatar tintin10q avatar wenest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

headless-henk's Issues

Repeating websockets exception

This error keeps occurring repeatedly, no pixels being placed:

File "C:\Users\-----\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Users\-----\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1371, in run
    self.function(*self.args, **self.kwargs)
  File "C:\Users\-----\github\headless-henk\client.py", line 103, in place_pixel
    self.differences = loop2.run_until_complete(
  File "C:\Users\-----\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
    return future.result()
  File "C:\Users\-----\github\headless-henk\images.py", line 94, in get_pixel_differences_with_canvas_download
    canvas = await build_canvas_image(canvas_indexes, username=username)
  File "C:\Users\-----\github\headless-henk\canvas.py", line 43, in build_canvas_image
    canvas_part = await get_canvas_part(image_id, username=username)
  File "C:\Users\-----\github\headless-henk\canvas.py", line 15, in get_canvas_part
    canvas_url = await reddit.get_canvas_url(canvas_id, username=username)
  File "C:\Users\-----\github\headless-henk\reddit.py", line 151, in get_canvas_url
    await websocket.recv()  # This is also ack
  File "C:\Users\-----\github\headless-henk\.venv\lib\site-packages\websockets\legacy\protocol.py", line 568, in recv
    await self.ensure_open()
  File "C:\Users\-----\github\headless-henk\.venv\lib\site-packages\websockets\legacy\protocol.py", line 935, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: received 1000 (OK) terminated; then sent 1000 (OK) terminated

Detect if banned or ratelimited when placing pixel

We checken nu bij het plaatsen van een pixel of we 200 terugkrijgen. Alleen is Reddit gemeen, want ze sturen ook 200 terug als we ratelimited of banned zijn. We zouden in de response moeten kijken of er een errors object is en welke message erin staat. Ik merk alleen dat mijn Python skills hiervoor even ontbreken.

{
   "errors":[
      {
         "message":"Ratelimited",
         "path":[
            "act"
         ],
         "extensions":{
            "nextAvailablePixelTs":2147483647000
         }
      },
      {
         "message":"ratelimit ''hit, next available: 2147483647000",
         "path":[
            "act"
         ]
      }
   ],
   "data":null
}

socket.gaierror: [Errno 11001] getaddrinfo failed when running pip installation

Error occurs as soon as it tries placing a pixel. Logs below:

File "C:\Users\Downloads\headless-henk-main\headless-henk-main\gaanmetdiebanaan.py", line 83, in
gaan()
File "C:\Users\Downloads\headless-henk-main\headless-henk-main\gaanmetdiebanaan.py", line 79, in gaan
asyncio.get_event_loop().run_until_complete(metdiebanaan())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Downloads\headless-henk-main\headless-henk-main\gaanmetdiebanaan.py", line 70, in metdiebanaan
await run_with_accounts_toml()
File "C:\Users\Downloads\headless-henk-main\headless-henk-main\gaanmetdiebanaan.py", line 65, in run_with_accounts_toml
await asyncio.gather(*run_client_coreroutines)
File "C:\Users\Downloads\headless-henk-main\headless-henk-main\client.py", line 477, in run_client
await client.connect()
File "C:\Users\Downloads\headless-henk-main\headless-henk-main\client.py", line 81, in connect
async with websockets.connect(self.uri) as websocket:
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\legacy\client.py", line 637, in aenter
return await self
^^^^^^^^^^
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\legacy\client.py", line 655, in await_impl_timeout
return await self.await_impl()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\websockets\legacy\client.py", line 659, in await_impl
_transport, _protocol = await self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1045, in create_connection
infos = await self._ensure_resolved(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1419, in _ensure_resolved
return await loop.getaddrinfo(host, port, family=family, type=type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 867, in getaddrinfo
return await self.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 11001] getaddrinfo failed

Impossible to use accounts.toml without specifying username/password or auth token

Hi, I'm trying to use the Docker container but despite having an accounts.toml this is spammed in logs:

You did not configure your username in config.toml it is still 'ENTER USERNAME HERE!'

I understand that I can use a volume for the config.toml and fix it manually but I would like to keep the setup as easy as possible for the members of our community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.