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

SystemError: <slot wrapper '__init__' of 'sip.simplewrapper' objects> returned a result with an error set #2545

Open
Auditor1234 opened this issue Apr 3, 2024 · 2 comments

Comments

@Auditor1234
Copy link

Operating system: ubuntu22.04.01
wxPython version & source: 4.2.1
Python version & source: 3.8.19

Description of the problem:
When I use 'glcanvas' to initialize a instance like this glcanvas.GLCanvas.__init__(self, parent, -1, attribList=attribList), then my program raise the exception.

Code Example (click to expand)
# Put code sample here
class Canvas3D(glcanvas.GLCanvas):
    def __init__(self, parent, manager=None):
        attribList = attribs = (glcanvas.WX_GL_CORE_PROFILE, glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 24)
        glcanvas.GLCanvas.__init__(self, parent, -1, attribList=attribList)
        self.init = False

on above

parent is <myvi.canvas3d.Viewer3D object at 0x75b558e26dc0>, an object inhereit from class `wx.Panel`
attribList=(21, 0, 3, 10, 24)
@swt2c
Copy link
Collaborator

swt2c commented Apr 3, 2024

Please provide both:

  1. The full stacktrace.
  2. A simple, complete, runnable example that reproduces the problem.

@Auditor1234
Copy link
Author

Thank you for your reply, cuase this problem occurs when I use other guy's complicate project and I am not familiar with wxPython , I am unable to simplify it and provide a simple example.

While the full stacktrace is as following:

/data/lzr/NormalSoftware/Anaconda3/envs/mamba/lib/python3.8/site-packages/wx/lib/pubsub/__init__.py:23: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, please migrate your code to use pypubsub, available on PyPI.
  warnings.warn('wx.lib.pubsub has been deprecated, please migrate your '
NotImplementedError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/lzr/ProgramFiles/python/Temp/Show3D.py", line 31, in <module>
    manager.show('Organ 3D Demo')
  File "/data/lzr/ProgramFiles/python/Temp/myvi/manager.py", line 282, in show
    Frame3D(None, title, self).Show()
  File "/data/lzr/ProgramFiles/python/Temp/myvi/frame3d.py", line 17, in __init__
    self.viewer = canvas3d.Viewer3D( self , manager)
  File "/data/lzr/ProgramFiles/python/Temp/myvi/canvas3d.py", line 132, in __init__
    self.canvas = Canvas3D(self, manager)
  File "/data/lzr/ProgramFiles/python/Temp/myvi/canvas3d.py", line 14, in __init__
    glcanvas.GLCanvas.__init__(self, parent, -1, attribList=attribList)
SystemError: <slot wrapper '__init__' of 'sip.simplewrapper' objects> returned a result with an error set

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

2 participants