mungewell / zoom-zt2

Python script to install/remove effects from the Zoom G1Four pedal
MIT License
50 stars 10 forks source link

How to run on Linux (solved) #25

Closed kwautztretschke closed 2 years ago

kwautztretschke commented 3 years ago

Disclaimer: I'm a noob. Since the prebuilt .exe doesn't do anything except open a blank commandline (which does appear to block some Midi ports or something, but no gui), I've tried running the script on Linux. First of all, there were three python modules I installed with pip (construct, mido, rtmidi), but now it just returns more obscure errors. Do I need more modules? Am I running the .exe wrong?

$ python3 zoomzt2-gui.py 
Traceback (most recent call last):
  File "/mnt/data/Downloads/B1Xon_v1.30_Win_E/zoom-zt2-prebuilt-0.4.0/zoomzt2-gui.py", line 289, in OnInit
    self.frame = _479389042__675845753_MyFrame(None, wx.ID_ANY, "")
  File "/mnt/data/Downloads/B1Xon_v1.30_Win_E/zoom-zt2-prebuilt-0.4.0/zoomzt2-gui.py", line 57, in __init__
    if self.ConnectPedal():
  File "/mnt/data/Downloads/B1Xon_v1.30_Win_E/zoom-zt2-prebuilt-0.4.0/zoomzt2-gui.py", line 246, in ConnectPedal
    if self.pedal.connect():
  File "/mnt/data/Downloads/B1Xon_v1.30_Win_E/zoom-zt2-prebuilt-0.4.0/zoomzt2.py", line 115, in connect
    for port in mido.get_input_names():
  File "/home/bernie/.local/lib/python3.9/site-packages/mido/backends/backend.py", line 169, in get_input_names
    devices = self._get_devices(**self._add_api(kwargs))
  File "/home/bernie/.local/lib/python3.9/site-packages/mido/backends/backend.py", line 163, in _get_devices
    return self.module.get_devices(**self._add_api(kwargs))
  File "/home/bernie/.local/lib/python3.9/site-packages/mido/backends/rtmidi.py", line 50, in get_devices
    rtapi = _get_api_id(api)
  File "/home/bernie/.local/lib/python3.9/site-packages/mido/backends/rtmidi.py", line 34, in _get_api_id
    return rtmidi.API_UNSPECIFIED
AttributeError: module 'rtmidi' has no attribute 'API_UNSPECIFIED'
OnInit returned false, exiting...
kwautztretschke commented 3 years ago

okay progress: rtmidi is the wrong package, I needed python3-rtmidi, which I installed via apt, instead of pip. This does not produce errors when starting zoomzt2-gui.py, but instead just does nothing. No gui is shown.

kwautztretschke commented 3 years ago

More progress: you need the wx-common apt package. The program just fails silently and does nothing when the package is absent, instead of producing any meaningful error. Had to find that out by painfully scraping through code. Now it shows a gui and appears to connect to the effectpedal.

marui07 commented 3 years ago

Im instead battling with an error with wx.. I already intalled form apt and pip but im getting the same error. Any help?

Traceback (most recent call last): File "zoomzt2-gui.py", line 284, in OnInit self.frame = _479389042__675845753_MyFrame(None, wx.ID_ANY, "") File "zoomzt2-gui.py", line 45, in __init__ self.__do_layout() File "zoomzt2-gui.py", line 88, in __do_layout sizer_4.Add(self.text_ctrl_1, 0, wx.ALIGN_CENTER | wx.EXPAND, 0) wx._core.wxAssertionError: C++ assertion "!(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))" failed at /home/wxpy/wxPython-4.1.1/ext/wxWidgets/src/common/sizer.cpp(2155) in DoInsert(): Horizontal alignment flags are ignored with wxEXPAND OnInit returned false, exiting...