每當我試着用Python安裝2.6.6運行這個python腳本,在Windows 7企業版(64位),我不斷收到此錯誤問題與索引
問題簽名: 問題事件名稱:APPCRASH
應用名稱:python.exe
應用程序版本:0.0.0.0
應用程序時間戳:4c73f7b6
故障模塊名稱:_csr.pyd
故障模塊版本:0.0.0.0
故障模塊時間戳:4d6a645b
異常代碼:0000005
異常偏移:000c05d4
我試着重新安裝Python和所有的模塊,我的程序上(即gensim,nlptk,SciPy的並運行numpy的)
我不知道這是爲你們足夠的數據,但請讓我知道!
lsi = models.LsiModel(corpus, num_topics = num_Topics)
index_lsi = similarities.MatrixSimilarity(lsi[corpus])
for k, v in dict_Queries.items():
File.write("Check Key: " +k+ "\n")
print "Running.... \n"
vec_bow = dict.doc2bow(v.split(), allow_update=True)
#In the last iteration, the code below the line doesn't run and i think the vec_lsi
#is the source of the problem but I don't know why?
vec_lsi = lsi[vec_bow]
#indexing the LSI
sims = index_lsi[vec_lsi]
sims = sorted(enumerate(sims), key = lambda item: -item[1])
if not cut_Off == 0:
sims = sims[0:cut_Off]
else:
pass
for t in sims:
dup_info = dict_tcs.get(t[0])
if t[1] > 0.75:
#print "Key: " + k + " Link: " + dup_info + "\n"
File.write("Adding: "+str(t)+ " To LSI actual \n")
if dict_Actual_LSI.has_key(k):
links = dict_Actual_LSI.get(k)
links.append(dup_info)
else:
links = []
links.append(dup_info)
dict_Actual_LSI[k] = links
print "Added\n"
在最後一次迭代中,線下的代碼不能運行,我認爲vec_lsi是問題的根源,但我不知道爲什麼?
謝謝
做什麼工作? 「打印」你好世界「工作? – 2012-01-06 21:52:26
Exactly-例如,嘗試'蟒蛇-c「打印「你好,世界」'在命令行 – 2012-01-06 22:13:25
是這樣的作品,所以它是我的代碼裏面的東西? – Shahab 2012-01-09 14:13:43