wxPython 2.8.7.1版本的一个严重BUG和解决方法
来源:互联网 发布:推销几个淘宝男装好看 编辑:程序博客网 时间:2024/05/17 10:42
wxPython 2.8.7.1版本有一个严重BUG,运行wxPython脚本会出现如下错误:
F:/ddd.py:1: DeprecationWarning: The wxPython compatibility package is no longer
automatically generated or actively maintained. Please switch to the wx packag
e as soon as possible.
from wxPython.wx import *
Traceback (most recent call last):
File "F:/ddd.py", line 1, in <module>
from wxPython.wx import *
File "C:/Python25/Lib/site-packages/wx-2.8-msw-ansi/wxPython/__init__.py", lin
e 15, in <module>
import _wx
File "C:/Python25/Lib/site-packages/wx-2.8-msw-ansi/wxPython/_wx.py", line 8,
in <module>
from _misc import *
File "C:/Python25/Lib/site-packages/wx-2.8-msw-ansi/wxPython/_misc.py", line 4
56, in <module>
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
AttributeError: 'module' object has no attribute 'DateTime_GetNumberOfDaysinYear
'
原因是wxPython 2.8.7.1版本中有一个变量名的拼写错误,修改site-packages/wx-2.8-msw-ansi/wxPython目录下的
_misc.py文件,把其中下面这句:
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
修改为:
wxDateTime_GetNumberOfDaysInYear = wx._misc.DateTime_GetNumberOfDaysInYear
注意这里的In错误的写成in了,大写写成了小写。
可以参考下面sourceforge上wxPython项目的解释:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1845098&group_id=9863
[ 1845098 ] Get attribute error (2.8.7.1) You may monitor this Tracker item after you log in (register an account, if you do not already have one) Submitted By:
jvenable - jvenable Date Submitted:
2007-12-05 12:19 Changed to Closed status by:
robind Closed as of:
2008-05-12 13:09 Last Updated By:
robind - Comment added Date Last Updated:
2008-05-12 13:09 Number of Comments:
1 Number of Attachments:
0 Category: (?)
wxPython specific Group: (?)
None Assigned To: (?)
Robin Dunn Priority: (?)
5 Status: (?)
Closed Resolution: (?)
Fixed Summary: (?)
Get attribute error (2.8.7.1) Private: (?)
No wxPython 2.8.7.1
(wxMSW, ansi, wx-assertions-on, SWIG-1.3.29)
Running on Python 2.3.5
This line in _misc.py appears to be in error:
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
I believe it should be:
wxDateTime_GetNumberOfDaysInYear = wx._misc.DateTime_GetNumberOfDaysInYear
Note the capitalized "In"
I get an exception:
AttributeError: 'module' object has no attribute
'DateTime_GetNumberOfDaysinYear'
unless I change it.
Thanks,
John Venable
jrvenable@gmail.com
Followups: Comments Date: 2008-05-12 13:09Sender: robindLogged In: YES user_id=53955Originator: NOThis has already been fixed in SVN for the next release. However, pleasenote the DeprecationWarning and don't use the wxPython package. The wxpackage should be used instead.
F:/ddd.py:1: DeprecationWarning: The wxPython compatibility package is no longer
automatically generated or actively maintained. Please switch to the wx packag
e as soon as possible.
from wxPython.wx import *
Traceback (most recent call last):
File "F:/ddd.py", line 1, in <module>
from wxPython.wx import *
File "C:/Python25/Lib/site-packages/wx-2.8-msw-ansi/wxPython/__init__.py", lin
e 15, in <module>
import _wx
File "C:/Python25/Lib/site-packages/wx-2.8-msw-ansi/wxPython/_wx.py", line 8,
in <module>
from _misc import *
File "C:/Python25/Lib/site-packages/wx-2.8-msw-ansi/wxPython/_misc.py", line 4
56, in <module>
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
AttributeError: 'module' object has no attribute 'DateTime_GetNumberOfDaysinYear
'
原因是wxPython 2.8.7.1版本中有一个变量名的拼写错误,修改site-packages/wx-2.8-msw-ansi/wxPython目录下的
_misc.py文件,把其中下面这句:
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
修改为:
wxDateTime_GetNumberOfDaysInYear = wx._misc.DateTime_GetNumberOfDaysInYear
注意这里的In错误的写成in了,大写写成了小写。
可以参考下面sourceforge上wxPython项目的解释:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1845098&group_id=9863
[ 1845098 ] Get attribute error (2.8.7.1) You may monitor this Tracker item after you log in (register an account, if you do not already have one) Submitted By:
jvenable - jvenable Date Submitted:
2007-12-05 12:19 Changed to Closed status by:
robind Closed as of:
2008-05-12 13:09 Last Updated By:
robind - Comment added Date Last Updated:
2008-05-12 13:09 Number of Comments:
1 Number of Attachments:
0 Category: (?)
wxPython specific Group: (?)
None Assigned To: (?)
Robin Dunn Priority: (?)
5 Status: (?)
Closed Resolution: (?)
Fixed Summary: (?)
Get attribute error (2.8.7.1) Private: (?)
No wxPython 2.8.7.1
(wxMSW, ansi, wx-assertions-on, SWIG-1.3.29)
Running on Python 2.3.5
This line in _misc.py appears to be in error:
wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear
I believe it should be:
wxDateTime_GetNumberOfDaysInYear = wx._misc.DateTime_GetNumberOfDaysInYear
Note the capitalized "In"
I get an exception:
AttributeError: 'module' object has no attribute
'DateTime_GetNumberOfDaysinYear'
unless I change it.
Thanks,
John Venable
jrvenable@gmail.com
Followups: Comments Date: 2008-05-12 13:09Sender: robindLogged In: YES user_id=53955Originator: NOThis has already been fixed in SVN for the next release. However, pleasenote the DeprecationWarning and don't use the wxPython package. The wxpackage should be used instead.
- wxPython 2.8.7.1版本的一个严重BUG和解决方法
- CAtlHttpClient的一个严重bug
- 10gR2一个很严重的bug
- Java nio的一个严重BUG
- java nio的一个严重BUG
- java nio的一个严重BUG
- iOS 10系统的一个严重Bug
- Bug的严重等级和优先级
- 2008-3-25号发布的PL/SQL Developer 7.1.5版本,存在几个严重BUG
- 史上最严重的BUG
- CSDN的严重BUG!
- 发现了 ANTIARP这个软件的 一个严重的 BUG
- WTP开发web service的一个严重bug
- 终于解决掉文件系统fwrite一个严重的bug
- c++,一个分号照成的严重bug
- Java nio的一个严重BUG,导致cpu 100%
- 一个很严重的易语言BUG....希望尽快修复
- Java nio的一个严重BUG,导致cpu 100%
- 快速排序 Quick Sort在软考中考查的知识点,转发自NUS
- XML之父批评Java语言令人厌烦 Java社群反唇相讥
- Java桌面应用程序设计新贵:SWT 简介
- J2EE中关于权限设计的思考
- 第一次写博客
- wxPython 2.8.7.1版本的一个严重BUG和解决方法
- IBM IT 3月基础架构管理大会
- 美国电影《Forrest gump》经典台词
- SOA将成05年度热门话题 客户真的需要吗?
- 常用细线表格的CSS实现
- 新BLOG,新起点
- IBM:Rational 用户3月培训
- IBM:面向服务的架构(SOA)讲座
- MDA 与 Rational 新一代的建模工具