abulka / pynsource

Reverse engineer Python source code into UML
http://pynsource.com
283 stars 40 forks source link

wxPyDeprecationWarning: Call to deprecated item. #47

Closed yudi-matsuzake closed 7 years ago

yudi-matsuzake commented 8 years ago

Description

The error occurred after I run the rungui.sh.

Complete message

Gtk-Message: Failed to load module "canberra-gtk-module"
pyNsourceGui.py:53: wxPyDeprecationWarning: Call to deprecated item. 
  wx.InitAllImageHandlers()
Traceback (most recent call last):
  File "pyNsourceGui.py", line 647, in <module>
    main()
  File "pyNsourceGui.py", line 634, in main
    application = MainApp(0)
  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8628, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8196, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "pyNsourceGui.py", line 142, in OnInit
    self.umlwin.InitSizeAndObjs()  # Now that frame is visible and calculated, there should be sensible world coords to use
  File "/home/yudi/Downloads/pyNsource-umlgenerator/pynsource/src/gui/uml_canvas.py", line 71, in InitSizeAndObjs
    assert not self.canvas_resizer.canvas_too_small(), "InitSizeAndObjs being called too early - please set up enclosing frame size first"
AssertionError: InitSizeAndObjs being called too early - please set up enclosing frame size first

Using:

abulka commented 7 years ago

Thanks for reporting this. I'll try it on ubuntu some time to compare behaviours...

abulka commented 7 years ago

Confirmed. Seems wxpython3 has slightly different behaviour than wxpython2..8 with regards to the timing of canvas size changes in response to a frame/window size change.

Fixed in latest master.