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

Running pynsource under python 3.10 needs ints not floats to all OGL calls #117

Open
abulka opened this issue Mar 1, 2023 · 1 comment

Comments

@abulka
Copy link
Owner

abulka commented Mar 1, 2023

I've fixed most of these, but here is another.

Traceback (most recent call last):
  File "/Users/andy/Devel/pynsource/src/gui/repair_ogl.py", line 107, in new_OnMouseEvent
    old_OnMouseEvent(self, event)
  File "/Users/andy/Devel/pynsource/venv310/lib/python3.10/site-packages/wx/lib/ogl/canvas.py", line 321, in OnMouseEvent
    self.Draw()
  File "/Users/andy/Devel/pynsource/venv310/lib/python3.10/site-packages/wx/lib/ogl/canvas.py", line 101, in Draw
    self.GetDiagram().Redraw(dc)
  File "/Users/andy/Devel/pynsource/venv310/lib/python3.10/site-packages/wx/lib/ogl/diagram.py", line 42, in Redraw
    object.Draw(dc)
  File "/Users/andy/Devel/pynsource/venv310/lib/python3.10/site-packages/wx/lib/ogl/basic.py", line 1436, in Draw
    self.GetEventHandler().OnDraw(dc)
  File "/Users/andy/Devel/pynsource/venv310/lib/python3.10/site-packages/wx/lib/ogl/basic.py", line 154, in OnDraw
    self._previousHandler.OnDraw(dc)
  File "/Users/andy/Devel/pynsource/venv310/lib/python3.10/site-packages/wx/lib/ogl/divided.py", line 181, in OnDraw
    RectangleShape.OnDraw(self, dc)
  File "/Users/andy/Devel/pynsource/venv310/lib/python3.10/site-packages/wx/lib/ogl/basic.py", line 2774, in OnDraw
    dc.DrawRectangle(int(x1), int(y1), self._width, self._height)
TypeError: DC.DrawRectangle(): arguments did not match any overloaded call:
  overload 1: argument 3 has unexpected type 'float'
  overload 2: argument 1 has unexpected type 'int'
  overload 3: argument 1 has unexpected type 'int'
@abulka
Copy link
Owner Author

abulka commented Mar 2, 2023

Looks like a problem with the wxPython OGL module - see wxWidgets/Phoenix#2349.

May have to work around this by bundling a local copy of OGL.py with the required float to int fixes.

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

1 participant