
今天写了个代码,然后报错:
AttributeError: 'module' object has no attribute '_strptime_time' 然后网上搜了下,说是多线程的BUG。
于是升级了Python到最新版: 2.7.9
结果运行后,还是同样的报错。
OMG。
难道Python的BUG都不修复的? 还是其他原因导致的报错?
1 xcv58 2015 年 2 月 22 日 via iPhone 你确定最新版 Python 是 2.7.9 |
2 evlos 2015 年 2 月 22 日 这不是 bug 吧 |
3 pandada8 2015 年 2 月 22 日 http://bugs.python.org/issue7980 貌似是没修 Thread safety: The use of strptime is thread safe, but with one important caveat. The first use of strptime is not thread safe because the first use will import _strptime. That import is not thread safe and may throw AttributeError or ImportError. To avoid this issue, ** import _strptime explicitly before starting threads, or call strptime once before starting threads. ** |
4 evlos 2015 年 2 月 22 日 引用 http://bugs.python.org/issue7980 >> Thread safety: The use of strptime is thread safe, but with one important caveat. The first use of strptime is not thread safe because the first use will import _strptime. That import is not thread safe and may throw AttributeError or ImportError. To avoid this issue, import _strptime explicitly before starting threads, or call strptime once before starting threads. |
6 aaaa007cn 2015 年 2 月 22 日 |
7 pandada8 2015 年 2 月 22 日 |
14 bombless 2015 年 2 月 22 日 这是用bug来逼你们升到3的节奏啊 |
17 ehs2013 2015 年 2 月 23 日 下载 Python Mercurial 上最新 2.7 的源码编译一下看看吧,也许修复了也有可能。 |