YoRyan / nuxhash

A NiceHash cryptocurrency mining client for Linux.
GNU General Public License v3.0
264 stars 164 forks source link

IndexError: list index out of range #73

Closed benthetechguy closed 3 years ago

benthetechguy commented 3 years ago

whenever I try to run nuxhashd --show-mining it immediately crashes. Here is the output:

2021-02-13 15:31:08,053 INFO: Querying NiceHash for miner connection information...
2021-02-13 15:31:08,055 DEBUG: Starting new HTTPS connection (1): api2.nicehash.com:443
2021-02-13 15:31:08,342 DEBUG: https://api2.nicehash.com:443 "GET /main/api/v2/public/simplemultialgo/info/ HTTP/1.1" 200 None
2021-02-13 15:31:08,344 DEBUG: Starting new HTTPS connection (1): api2.nicehash.com:443
2021-02-13 15:31:08,618 DEBUG: https://api2.nicehash.com:443 "GET /main/api/v2/mining/algorithms/ HTTP/1.1" 200 None
2021-02-13 15:31:08,628 DEBUG: =========================== www.nicehash.com =========================
2021-02-13 15:31:08,628 DEBUG:            Excavator v1.5.14a GPU Miner for NiceHash.
2021-02-13 15:31:08,628 DEBUG:            Copyright (C) 2018 NiceHash. All rights reserved.
2021-02-13 15:31:08,629 DEBUG: =========================== www.nicehash.com =========================
2021-02-13 15:31:08,629 DEBUG: Build time: 2018-12-07 10:21:06+01:00
2021-02-13 15:31:08,629 DEBUG: Build number: 3897564716
2021-02-13 15:31:08,629 DEBUG: [15:31:08][0x00007fb4f0259dc0][info] Log started
2021-02-13 15:31:08,636 DEBUG: [15:31:08][0x00007fb4f0259dc0][info] core | Found CUDA device: GeForce GTX 1050 Ti
2021-02-13 15:31:08,745 DEBUG: [15:31:08][0x00007fb4f0259dc0][info] api | Listening on 127.0.0.1:52837
2021-02-13 15:31:08,745 DEBUG: [15:31:08][0x00007fb4f0259dc0][info] core | Initialized!
2021-02-13 15:31:08,747 DEBUG: Starting new HTTPS connection (1): api2.nicehash.com:443
2021-02-13 15:31:08,922 DEBUG: [15:31:08][0x00007fb4f0259dc0][info] Connected to nhmp.usa.nicehash.com:3200
2021-02-13 15:31:08,996 DEBUG: [15:31:08][0x00007fb4ef1b5640][info] nhmp | Subscribed
2021-02-13 15:31:09,029 DEBUG: https://api2.nicehash.com:443 "GET /main/api/v2/public/simplemultialgo/info/ HTTP/1.1" 200 None
Traceback (most recent call last):
  File "/home/ben/.local/bin/nuxhashd", line 8, in <module>
    sys.exit(nuxhashd())
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/__init__.py", line 3, in nuxhashd
    main()
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/daemon.py", line 111, in main
    session.run()
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/daemon.py", line 270, in run
    self._scheduler.run()
  File "/usr/lib/python3.9/sched.py", line 151, in run
    action(*argument, **kwargs)
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/daemon.py", line 297, in _switch_algos
    revenues = {device: {algorithm: revenue(device, algorithm)
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/daemon.py", line 297, in <dictcomp>
    revenues = {device: {algorithm: revenue(device, algorithm)
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/daemon.py", line 297, in <dictcomp>
    revenues = {device: {algorithm: revenue(device, algorithm)
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/daemon.py", line 292, in revenue
    return sum([payrates[sub_algo]*benchmarks[algorithm.name][i]
  File "/home/ben/.local/lib/python3.9/site-packages/nuxhash/daemon.py", line 292, in <listcomp>
    return sum([payrates[sub_algo]*benchmarks[algorithm.name][i]
IndexError: list index out of range
2021-02-13 15:31:09,031 CRITICAL: Crash! Killing all miners.
fish: “nuxhashd --show-mining” terminated by signal SIGKILL (Forced quit)
benthetechguy commented 3 years ago

Another thing to mention is that I'm using a 1050 Ti with 4GB VRAM, so before this it would run out of memory when trying to mine with daggerhashimoto. I followed advice in #51 and set the hashrate for that algo to 0 in benchmarks.json so the profit switcher wouldn't use it.

benthetechguy commented 3 years ago

Welp, it turns out it was just me being stupid while editing benchmarks.json. When editing excavator_daggerhashimoto_decred and excavator_daggerhashimoto_pascal, I put one value in while two were expected.

        "excavator_daggerhashimoto_decred": 0,
        "excavator_daggerhashimoto_pascal": 0,

What I changed it to to fix it:

        "excavator_daggerhashimoto_decred": [
            0,
            0
        ],
        "excavator_daggerhashimoto_pascal": [
            0,
            0
        ],