TypeError: 'NoneType' object is not subscriptable
Closed this issue · 6 comments
d1210182010 commented
您好,我在嘗試以下參數起課時
kinliuren.Liuren('冬至', '十二', '己未', '壬申').result(0)
出現以下錯誤:
1244 earth_to_general = dict(zip(earth, guiren_order_list_3))
1245 sky_earth_guiren_dict = {"天盤":sky, "地盤":earth, "天將":guiren_order_list_3}
-> 1246 ju = [ju_three_pass[0][0], ju_three_pass[0][1]]
1247 three_pass_zhi = ju_three_pass[0][2]
1248 three_pass_generals = [guiren_order_list_2.get(i) for i in three_pass_zhi]
TypeError: 'NoneType' object is not subscriptable
另舉幾個同樣會引起這個錯誤的組合
- 芒種 五 丙申 戊子
- 芒種 五 戊戌 壬子
- 夏至 六 癸亥 己未
- 夏至 六 甲子 乙丑
- 大暑 六 己丑 戊辰
- 大暑 七 辛卯 丙申
- 霜降 十 丙寅 癸巳
- 霜降 十 丁卯 庚戌
- 立冬 十 己巳 戊辰
- 立冬 十 庚午 甲申
kentang2017 commented
謝謝報錯,有空我做一做修正!
kentang2017 commented
您好,我在嘗試以下參數起課時
kinliuren.Liuren('冬至', '十二', '己未', '壬申').result(0)
出現以下錯誤:
1244 earth_to_general = dict(zip(earth, guiren_order_list_3)) 1245 sky_earth_guiren_dict = {"天盤":sky, "地盤":earth, "天將":guiren_order_list_3} -> 1246 ju = [ju_three_pass[0][0], ju_three_pass[0][1]] 1247 three_pass_zhi = ju_three_pass[0][2] 1248 three_pass_generals = [guiren_order_list_2.get(i) for i in three_pass_zhi] TypeError: 'NoneType' object is not subscriptable
另舉幾個同樣會引起這個錯誤的組合
- 芒種 五 丙申 戊子
- 芒種 五 戊戌 壬子
- 夏至 六 癸亥 己未
- 夏至 六 甲子 乙丑
- 大暑 六 己丑 戊辰
- 大暑 七 辛卯 丙申
- 霜降 十 丙寅 癸巳
- 霜降 十 丁卯 庚戌
- 立冬 十 己巳 戊辰
- 立冬 十 庚午 甲申
全部試過,都是可以的。請問你是用哪個版本?在github最近上載的都是跑到出來的。
d1210182010 commented
套件版本是kinliuren==0.1.2.6
,python版本是
Python 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
kentang2017 commented
套件版本是
kinliuren==0.1.2.6
,python版本是Python 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
現在pypi 要雙重認證,才可把更新套件放上架,本人能力和時間有限,以後應該不會再放在PYPI裡。建議閣下在這直接下載,然後把kinliuren.py 貼上到site-packages內的kinliuren裡。
d1210182010 commented
謝謝,看起來成功運作了,但kinliuren.py有一個部份需要調整,即行1046中,需多加入以下定義否則會報錯
ganlivezhi = self.shigangjigong
kentang2017 commented
謝謝報錯,我會適時修改調整,感謝!