0
我新的PythonNameError:全局名稱「ERROR_DEFS」沒有定義
This是Python腳本,我試圖執行:
[[email protected] tools]# ./zynq-boot-bin.py
test.py -u <inputfile> -o <outputfile>
[[email protected] tools]# ./zynq-boot-bin.py -u u-boot-spl -o BOOT.BIN
Input file is: u-boot-spl
Output file is: BOOT.BIN
Using /home/Hannan/master-next/u-boot-xlnx/tools/u-boot-spl to get image length - it is 470104 (0x72c58) bytes
Loaded to the OCM image should fit into 3 mapped pages of OCM - 192K (0x30000), specified 0x72c58
Traceback (most recent call last):
File "./zynq-boot-bin.py", line 217, in <module>
0) #start_exec)
File "./zynq-boot-bin.py", line 132, in image_generator
exit (ERROR_DEFS['HEAD'])
NameError: global name 'ERROR_DEFS' is not defined
[[email protected] tools]#
我怎麼解決這個問題呢?
什麼ERROR_DEFS? – dhana
該腳本正在尋找名爲'ERROR_DEFS'的字典。快速瀏覽一下你提供的腳本,就會發現代碼中沒有這樣的字典。 – msvalkon
您是否編寫了這段代碼? – geoffspear