wx Module misses attribute ArtProvider

一世执手 提交于 2019-12-13 08:53:31

问题


I am adapting a model in SUMO and try to run a file (sumopy_gui.py). When doing so I get the following error message:

AttributeError: module 'wx' has no attribute 'ArtProvider_GetBitmap'

I tried to update wx in the cmd line, reinstalling it, but I don't find a reason why wx shouldn't have this module. All the other modules seem to be working for now. Can someone help me please?

Thanks


回答1:


If you are using wxPython 4, then you want to use wx.ArtProvider.GetBitmap. Previous versions (i.e. Classic) used the old ArtProvider_GetBitmap.

A good place to check for these kinds of differences is the following:

  • https://wxpython.org/Phoenix/docs/html/classic_vs_phoenix.html

I also recommend reading the Migration Guide from Classic to Phoenix:

  • https://wxpython.org/Phoenix/docs/html/MigrationGuide.html


来源:https://stackoverflow.com/questions/51946044/wx-module-misses-attribute-artprovider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!