我对编码很陌生,在使用nltk的代码中将python文件导出到.exe文件时遇到了问题。
这是我的代码。
from PyDictionary import PyDictionary
from nltk.corpus import words
import random
import pyautogui
import time
dictionary=PyDictionary()
time.sleep(1)
while True:
ran = random.randint(1, 236736)
word_list = words.words()
correct_word = (dictionary.meaning(word_list[ran]))
propper_formating = "%s meaning: %s " % (word_list[ran], correct_word)
no_none = propper_formating.count("None")
if no_none == 0:
pyautogui.write(propper_formating)
pyautogui.press("enter")
quit()
有人知道发生了什么吗?