YoRyan / nuxhash

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

nuxhash-gui not working in Kubuntu-20.04 #62

Open mstrobl2 opened 4 years ago

mstrobl2 commented 4 years ago

Nuxhashd works fine, but when I try nuxhash-gui I get this:

Traceback (most recent call last):
  File "/usr/local/bin/nuxhash-gui", line 8, in <module>
    sys.exit(nuxhash_gui())
  File "/usr/local/lib/python3.8/dist-packages/nuxhash/__init__.py", line 7, in nuxhash_gui
    main()
  File "/usr/local/lib/python3.8/dist-packages/nuxhash/gui/main.py", line 146, in main
    frame = MainWindow(None, title='nuxhash')
  File "/usr/local/lib/python3.8/dist-packages/nuxhash/gui/main.py", line 42, in __init__
    MiningScreen(notebook, devices=self._Devices),
  File "/usr/local/lib/python3.8/dist-packages/nuxhash/gui/mining.py", line 91, in __init__
    bottomSizer.Add(self._StartStop, wx.SizerFlags().Expand()
wx._core.wxAssertionError: C++ assertion "!(flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL))" failed at /tmp/pip-install-fj13ulot/wxpython/ext/wxWidgets/src/common/sizer.cpp(2111) in DoInsert(): Vertical alignment flags are ignored with wxEXPAND
/usr/local/lib/python3.8/dist-packages/wx/lib/pubsub/__init__.py:23: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.
  warnings.warn('wx.lib.pubsub has been deprecated, plese migrate your '

This repeats endlessly, each time as a new process and I have to 'killall nuxhash-gui' to stop it.

poggingfish commented 3 years ago

same ;/

sinnx3 commented 3 years ago

@YoRyan Any thoughts?

Eric1212 commented 3 years ago

Same here on Debian 10.

eric@Eric-PC:~$ nuxhash-gui
/usr/lib/python3/dist-packages/wx/lib/pubsub/__init__.py:25: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.
  wx.wxPyDeprecationWarning)

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.164: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.165: Negative content width -33 (allocation 1, extents 17x17) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.165: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.165: Negative content width -33 (allocation 1, extents 17x17) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.165: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.165: Negative content width -33 (allocation 1, extents 17x17) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.165: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.166: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.167: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.167: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.169: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.171: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.171: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-WARNING **: 02:02:44.171: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.171: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/nuxhash/gui/mining.py", line 140, in do_requests
    wallet, unpaid = get_balances(self._Settings)
  File "/usr/local/lib/python3.7/dist-packages/nuxhash/nicehash.py", line 27, in get_balances
    'GET', f'/main/api/v2/mining/external/{address}/rigs/', '', None)
  File "/usr/local/lib/python3.7/dist-packages/nuxhash/nhrest/python/nicehash.py", line 38, in request
    raise Exception(str(response.status_code) + ": " + response.reason)
Exception: 404: Not Found

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.224: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.242: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.257: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.291: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.308: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.325: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.340: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.356: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.374: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(nuxhash-gui:11848): Gtk-CRITICAL **: 02:02:44.389: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton
AgenttiX commented 3 years ago

Confirmed on Kubuntu 20.10 as well.

$ nuxhash-gui
/usr/lib/python3/dist-packages/wx/lib/pubsub/__init__.py:23: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI.
  warnings.warn('wx.lib.pubsub has been deprecated, plese migrate your '

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.628: Negative content width -9 (allocation 1, extents 5x5) while allocating gadget (node scrollbar, owner GtkScrollbar)

(nuxhash-gui:1104659): Gtk-CRITICAL **: 00:18:19.628: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.628: Negative content width -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.628: Negative content height -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.628: Negative content width -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.628: Negative content height -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.628: Negative content width -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.628: Negative content height -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/nuxhash/gui/mining.py", line 140, in do_requests
    wallet, unpaid = get_balances(self._Settings)
  File "/usr/local/lib/python3.8/dist-packages/nuxhash/nicehash.py", line 26, in get_balances
    response = nh.public_api(HOST).request(
  File "/usr/local/lib/python3.8/dist-packages/nuxhash/nhrest/python/nicehash.py", line 38, in request
    raise Exception(str(response.status_code) + ": " + response.reason)
Exception: 404: Not Found

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.690: Negative content height -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)

(nuxhash-gui:1104659): Gtk-WARNING **: 00:18:19.690: Negative content height -13 (allocation 1, extents 7x7) while allocating gadget (node button, owner GtkButton)
Katzekonig commented 3 years ago

Same here. Developer still maintaining this?

LukasArmstrong commented 3 years ago

No clue, doing a quick check over the issues. It seems the last they responsed to one was in may of 2020. However, I dug in a bit and was able to get it working (mostly). I'll look more into it later, because there exist a better solution. This was just quick and dirty modding.

  1. Since wx.lib.pubsub is deprecated in wxPython, I installed PyPubSub (pip install PyPubSub for the lazy)
  2. Cloned the repo, then under nuxhash/gui/ and going into benchmarks.py, main.py, mining.py, and settings.py each. I looked for the from wx.lib.pubsub import pub line. Once found, I would remove the wx.lib. making the line be from pubsub import pub
  3. Then going back into mining.py, I commented out line 91 or bottomSizer.Add(self._StartStop, wx.SizerFlags().Expand().Center()) (I think the .Center() might be on line 91. I just moved it up to 91 for ease). I'm not a 100% what is up with this line, but all I know is it has something to do with the start/stop button on the "Mining"
  4. Then I rebuilt/reinstalled the repo by going to main folder in the repo and running pip install -e .
  5. When I ran the gui, it came up. However I'm getting a 404 error based on something with the threading. That might just be my machine though.
thetuxinator commented 2 years ago

You may try the fork from https://github.com/idkau/nuxhash