我在我的系統上安裝了一個開源應用程序,用Python設計,現在我試圖插入一個日期早於1900年的日期,它導致錯誤**Year Out Of Range**
現在我正在考慮解決它,以便它可以讓我存儲任何日期從1000 - 9999年。這是由於Python或由於我的應用程序的錯誤,任何建議和解決方案將高度讚賞。年Python超出範圍?
回答
這是已報告的python bug。該地址提供補丁。
那麼我使用Python 2.6和這是爲3.2,你有一個2.6補丁鏈接 – ScoRpion
[2.6補丁](https://github.com/minitage-dependencies/ python-2.6/raw/master/patches/strftime-pre-1900.patch) – CamilleLDN
我無法在我的電腦上找到這個文件。「Lib/test/test_datetime.py」我正在使用python 2.6.5。當我嘗試找到datetime.py時,發現以下結果 – ScoRpion
- 1. Python:索引超出範圍
- 2. 索引超出範圍,Python?
- 3. Python的IndexError超出範圍
- 4. python IndexError:超出範圍?
- 5. Python索引超出範圍?
- 6. 年已超出有效範圍:1400 ... 10000
- 7. ValueError:年份超出範圍pyplot
- 8. python datetime fromtimestamp產生值errorrorror年超出範圍
- 9. PreparedStatement拋出索引超出範圍時,它不超出範圍
- 10. 年超出有效範圍時傳遞pos_infin如超時TIMED_WAIT
- 11. RowIndex超出範圍
- 12. 蟒:超出範圍
- 13. Javascript:超出範圍?
- 14. android:pointerIndex超出範圍
- 15. NSNumber超出範圍?
- 16. IndexError ...超出範圍,
- 17. NSURL超出範圍
- 18. SDL_image超出範圍
- 19. googletesting超出範圍
- 20. arraylist超出範圍
- 21. Java超出範圍
- 22. NSDate超出範圍
- 23. List.nub超出範圍
- 24. nsstring - 超出範圍
- 25. 索引錯誤,超出範圍Python
- 26. 的Python:索引超出範圍
- 27. MySQL + Python索引超出範圍錯誤
- 28. 的Python:列表賦值超出範圍
- 29. 索引超出範圍在DES python
- 30. 使用Flask/Python指數超出範圍
1600年前要小心,我會徹底拒絕他們。 –
11月5日失敗1605上Python 2.6.6 – shkschneider