kliment / Printrun

Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application won't run

schoenid opened this issue · comments

Installed with Discover:
image
The application does not run.

Starting in Console:

WARNING:root:RPC server bound on non-default port 7985
Traceback (most recent call last):
  File "/usr/bin/pronterface", line 62, in <module>
    app = PronterApp(False)
  File "/usr/lib/python3/dist-packages/printrun/pronterface.py", line 2439, in __init__
    self.mainwindow = PronterWindow(self)
  File "/usr/lib/python3/dist-packages/printrun/pronterface.py", line 207, in __init__
    self.reload_ui()
  File "/usr/lib/python3/dist-packages/printrun/pronterface.py", line 281, in reload_ui
    self.createGui(self.settings.uimode == _("Compact"),
  File "/usr/lib/python3/dist-packages/printrun/gui/__init__.py", line 259, in createGui
    viz_pane = VizPane(self, vizpanel)
  File "/usr/lib/python3/dist-packages/printrun/gui/viz.py", line 115, in __init__
    root.gwindow = gviz.GvizWindow(build_dimensions = root.build_dimensions_list,
  File "/usr/lib/python3/dist-packages/printrun/gviz.py", line 77, in __init__
    self.p = Gviz(panel, size = size, build_dimensions = build_dimensions, grid = grid, extrusion_width = extrusion_width, bgcolor = bgcolor, realparent = self)
  File "/usr/lib/python3/dist-packages/printrun/gviz.py", line 197, in __init__
    self.mainpen = wx.Pen(wx.Colour(0, 0, 0), penwidth)
TypeError: Pen(): arguments did not match any overloaded call:
  overload 1: too many arguments
  overload 2: argument 2 has unexpected type 'float'
  overload 3: argument 1 has unexpected type 'Colour'

The application hangs.

System:

Operating System: Ubuntu Studio 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-69-lowlatency (64-bit)
Graphics Platform: X11
Processors: 16 × 13th Gen Intel® Core™ i7-13700K
Memory: 62.6 GiB of RAM
Graphics Processor: llvmpipe

Trying to compile it:

$ git clone https://github.com/kliment/Printrun.git  # clone the repository
$ cd Printrun  # change to Printrun directory
$ python3 -m venv venv  # create an virtual environment
$ . venv/bin/activate  # activate the virtual environment (notice the space after the dot)
(venv) $ python -m pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/fedora-27/wxPython-4.0.1-cp36-cp36m-linux_x86_64.whl  # replace the link with yours
(venv) $ python -m pip install -r requirements.txt  

Stops with errors:

python -m pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.0-cp310-cp310-linux_x86_64.whl
Collecting wxPython==4.2.0
  Downloading https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.0-cp310-cp310-linux_x86_64.whl (146.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 146.4/146.4 MB 10.5 MB/s eta 0:00:00
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting numpy
  Downloading numpy-1.24.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 55.7 MB/s eta 0:00:00
Collecting pillow
  Downloading Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 58.7 MB/s eta 0:00:00
Installing collected packages: six, pillow, numpy, wxPython
Successfully installed numpy-1.24.2 pillow-9.5.0 six-1.16.0 wxPython-4.2.0
(venv) sd@Radieschen:~/.local/share/Printrun$ python -m pip install -r requirements.txt
Ignoring pyobjc-framework-Cocoa: markers 'sys_platform == "darwin"' don't match your environment
Ignoring pyreadline3: markers 'sys_platform == "win32"' don't match your environment
Collecting pyserial>=3.0
  Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.6/90.6 KB 4.3 MB/s eta 0:00:00
Requirement already satisfied: wxPython>=4.2.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (4.2.0)
Requirement already satisfied: numpy>=1.8.2 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (1.24.2)
Collecting pyglet<2.0,>=1.1
  Downloading pyglet-1.5.27-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 10.5 MB/s eta 0:00:00
Collecting cffi
  Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 KB 15.2 MB/s eta 0:00:00
Collecting cairocffi
  Downloading cairocffi-1.5.0.tar.gz (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 KB 19.1 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cairosvg<2.6.0,>=1.0.9
  Downloading CairoSVG-2.5.2-py3-none-any.whl (45 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.8/45.8 KB 26.8 MB/s eta 0:00:00
Collecting psutil>=2.1
  Downloading psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (280 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 280.2/280.2 KB 18.6 MB/s eta 0:00:00
Collecting lxml>=2.9.1
  Downloading lxml-4.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (7.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 28.5 MB/s eta 0:00:00
Collecting appdirs>=1.4.0
  Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting dbus-python>=1.2.0
  Downloading dbus-python-1.3.2.tar.gz (605 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 605.5/605.5 KB 49.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [94 lines of output]
      The Meson build system
      Version: 1.1.0
      Source dir: /tmp/pip-install-b4ydg2lk/dbus-python_e7b8f815c3f54df39ba9eaca0e48e5ab
      Build dir: /tmp/pip-install-b4ydg2lk/dbus-python_e7b8f815c3f54df39ba9eaca0e48e5ab/.mesonpy-4n0myz1f/build
      Build type: native build
      Project name: dbus-python
      Project version: 1.3.2
      C compiler for the host machine: cc (gcc 11.3.0 "cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0")
      C linker for the host machine: cc ld.bfd 2.38
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Compiler for C supports arguments -fno-common: YES
      Compiler for C supports arguments -Wno-missing-field-initializers: YES
      Compiler for C supports arguments -Wno-declaration-after-statement: YES
      Compiler for C supports arguments -Wno-inline: YES
      Compiler for C supports arguments -Wno-redundant-decls: YES
      Compiler for C supports arguments -Wno-switch-default: YES
      Compiler for C supports arguments -Wno-write-strings: YES
      Compiler for C supports arguments -Wcast-align: YES
      Compiler for C supports arguments -Wdouble-promotion: YES
      Compiler for C supports arguments -Wduplicated-cond: YES
      Compiler for C supports arguments -Wfloat-equal: YES
      Compiler for C supports arguments -Wformat-nonliteral: YES
      Compiler for C supports arguments -Wformat-security: YES
      Compiler for C supports arguments -Wformat=2: YES
      Compiler for C supports arguments -Winit-self: YES
      Compiler for C supports arguments -Wlogical-op: YES
      Compiler for C supports arguments -Wmissing-declarations: YES
      Compiler for C supports arguments -Wmissing-format-attribute: YES
      Compiler for C supports arguments -Wmissing-include-dirs: YES
      Compiler for C supports arguments -Wmissing-noreturn: YES
      Compiler for C supports arguments -Wnull-dereference: YES
      Compiler for C supports arguments -Wpacked: YES
      Compiler for C supports arguments -Wpointer-arith: YES
      Compiler for C supports arguments -Wshadow: YES
      Compiler for C supports arguments -Wswitch-enum: YES
      Compiler for C supports arguments -Wundef: YES
      Compiler for C supports arguments -Wunused-but-set-variable: YES
      Compiler for C supports arguments -Wjump-misses-init: YES
      Compiler for C supports arguments -Wmissing-prototypes: YES
      Compiler for C supports arguments -Wnested-externs: YES
      Compiler for C supports arguments -Wold-style-definition: YES
      Compiler for C supports arguments -Wpointer-sign: YES
      Compiler for C supports arguments -Wstrict-prototypes: YES
      Configuring _dbus-python-config.h using configuration
      
      Executing subproject dbus-gmain
      
      dbus-gmain| Project name: dbus-gmain
      dbus-gmain| Project version: undefined
      dbus-gmain| C compiler for the host machine: cc (gcc 11.3.0 "cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0")
      dbus-gmain| C linker for the host machine: cc ld.bfd 2.38
      dbus-gmain| Compiler for C supports arguments -fno-common: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wno-missing-field-initializers: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wcast-align: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wdouble-promotion: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wduplicated-branches: YES
      dbus-gmain| Compiler for C supports arguments -Wduplicated-cond: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wfloat-equal: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wformat-nonliteral: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wformat-security: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wformat=2: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Winit-self: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wlogical-op: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-declarations: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-format-attribute: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-include-dirs: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-noreturn: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wnull-dereference: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wpacked: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wpointer-arith: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wredundant-decls: YES
      dbus-gmain| Compiler for C supports arguments -Wshadow: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wswitch-default: YES
      dbus-gmain| Compiler for C supports arguments -Wswitch-enum: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wundef: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wunused-but-set-variable: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wwrite-strings: YES
      dbus-gmain| Compiler for C supports arguments -Wdeclaration-after-statement: YES
      dbus-gmain| Compiler for C supports arguments -Wjump-misses-init: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wmissing-prototypes: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wnested-externs: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wold-style-definition: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wpointer-sign: YES (cached)
      dbus-gmain| Compiler for C supports arguments -Wstrict-prototypes: YES (cached)
      dbus-gmain| Found pkg-config: /usr/bin/pkg-config (0.29.2)
      dbus-gmain| Did not find CMake 'cmake'
      dbus-gmain| Found CMake: NO
      dbus-gmain| Run-time dependency dbus-1 found: NO (tried pkgconfig)
      
      ../../subprojects/dbus-gmain/meson.build:107:11: ERROR: Dependency "dbus-1" not found, tried pkgconfig
      
      A full log can be found at /tmp/pip-install-b4ydg2lk/dbus-python_e7b8f815c3f54df39ba9eaca0e48e5ab/.mesonpy-4n0myz1f/build/meson-logs/meson-log.txt
      + meson setup --prefix=/usr /tmp/pip-install-b4ydg2lk/dbus-python_e7b8f815c3f54df39ba9eaca0e48e5ab /tmp/pip-install-b4ydg2lk/dbus-python_e7b8f815c3f54df39ba9eaca0e48e5ab/.mesonpy-4n0myz1f/build --native-file=/tmp/pip-install-b4ydg2lk/dbus-python_e7b8f815c3f54df39ba9eaca0e48e5ab/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Manually installed

sudo apt install build-essential libpython3-dev libdbus-1-dev libglib2.0-dev

then it was running through without errors.

After continuing ...

(venv) $ python -m pip install Cython
(venv) $ python setup.py build_ext --inplace
(venv) $ python pronterface.py

I've got this result:
image
I can connect, home and turn off motors ...

However, a loaded stl file will not be displayed.

I've got errors in the terminal:

$ python pronterface.py
libEGL warning: DRI2: failed to authenticate

(pronterface.py:52407): dconf-WARNING **: 01:44:29.753: unable to open file '/etc/dconf/db/site': Failed to open file “/etc/dconf/db/site”: open() failed: No such file or directory; expect degraded performance

(pronterface.py:52407): Gtk-CRITICAL **: 01:47:13.200: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(pronterface.py:52407): Gtk-CRITICAL **: 01:47:13.450: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(pronterface.py:52407): Gtk-CRITICAL **: 01:47:17.620: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

(pronterface.py:52407): Gtk-CRITICAL **: 01:47:17.637: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkSpinButton

Ok, I see I have to leave the env.

Now everything is ok.

Thanks.