2017-04-20 67 views
-2

每次我嘗試啓動一個腳本時,我的一位前同事寫道,我收到一個回溯錯誤。在我看來,錯誤是由我的機器造成的,因爲腳本在其他機器上工作正常。 這是錯誤消息:Python 2.7:創建字典時出現跟蹤錯誤

Traceback (most recent call last): File "T:\55-Test-Bench\Simulation\replace_productfiles.py", line 328, in init_dicts(hersteller, bereich) File "T:\55-Test-Bench\Simulation\replace_productfiles.py", line 161, in init_dicts cat_dict = dict_builder(ws, 0, 1) File "T:\55-Test-Bench\Simulation\replace_productfiles.py", line 74, in dict_builder for cellObj in ws.columns[n]: TypeError: 'generator' object has no attribute 'getitem'

我真的很絕望的人,請幫助我。

親切的問候, 框架

+1

如果您發佈了引發該錯誤的代碼,以便其他人可以對其進行檢查並幫助您解決該問題,那將會更好。 –

回答

0

我已經降級openpyxl模塊(從2.4.7到1.5.4)解決的問題,因爲我是寫代碼的前同事這樣做,與1.5.4版本。