Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Pen(): arguments did not match any overloaded call #1277

Closed
GkqqNkKC opened this issue Jul 22, 2022 · 8 comments
Closed

TypeError: Pen(): arguments did not match any overloaded call #1277

GkqqNkKC opened this issue Jul 22, 2022 · 8 comments

Comments

@GkqqNkKC
Copy link

Hello, I have recently upgraded my Ubuntu from 20 to 22, and now I can't get Pronterface to work at all. It says:

WARNING:root:Could not setup DBus for sleep inhibition: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files
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'

I also downgraded my Python version to 3.6, 3.7 or 3.9, and it still doesn't work. The app is stuck and I have to press Ctrl+C to exit. I also have reinstalled Pronterface. Again, no success

@rockstorm101
Copy link
Collaborator

Hi @GkqqNkKC, thanks for reporting this. I am unable to reproduce it though. What's the output of the following commands on your machine?

$ python
>>> import wx
>>> wx.__version__

Mine looks like this:

$ python
Python 3.10.5 (main, Jun  8 2022, 09:26:22) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.__version__
'4.0.7'

@hroncok
Copy link
Collaborator

hroncok commented Jul 25, 2022

This should have been fixed by #1224

@rockstorm101
Copy link
Collaborator

rockstorm101 commented Jul 25, 2022

Ah, of course, that's it. Thanks a lot @hroncok. I'm afraid the Printrun version on Ubuntu 22.04 is not yet patched for this error. Patch is already in place in testing so it'll make its way through for 22.10.

Using Python 3.9 as a work around should work though. Remember to change the shebang line on /usr/bin/pronterface like:

- #!/usr/bin/python3
+ #!/usr/bin/python3.9

@rockstorm101
Copy link
Collaborator

Duplicate of #1225. Closing.

@galagithub
Copy link

almost 1 year passed an the issue is still present on Ubuntu 22.04 which is an LTS version !!!!

@hroncok
Copy link
Collaborator

hroncok commented Apr 26, 2023

I suggest you contact the Ubuntu folks, I am afraid the exclamation marks are wasted here.

@zhennik26
Copy link

zhennik26 commented Jun 7, 2023

I have the same problem on Ubuntu
WARNING:root:RPC server bound on non-default port 7982 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'

@DivingDuck
Copy link
Collaborator

@zhennik26,
as already stated, please contact the Ubuntu team. We can't do anything on this as we do not build the applications for the different Linux distros.
Alternatively you can run it from source following the instructions: https://github.com/kliment/Printrun#running-from-source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants