[問題] py2exe打包錯誤

看板Python作者 (溫柔殺手)時間6年前 (2018/05/15 17:14), 6年前編輯推噓1(101)
留言2則, 2人參與, 6年前最新討論串1/1
各位版上的大大好 我使用py2exe打包程式出現一大堆錯誤,但是我在Spyder下執行是沒有問題的。 煩請協助。 我的開發環境如下。 OS:windows 10 IDE:Anaconda Spyder 3 使用語法:Python 3 打包環境:anaconda prompt 有安裝py2exe 資料夾名稱:exe 資料夾容物:setup.py CheckinAndCheckout.py chromedriver.exe py2exe.py的內容: ------------------------------------------- from distutils.core import setup import py2exe setup(console=['CheckinAndChecout.py']) -------------------------------------------- CheckinAndCheckout.py的內容 -------------------------------------------- import time from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains driver = webdriver.Chrome() driver.get("https://pro.104.com.tw/hrm/psc/home.action") driver.find_element_by_id("email").send_keys("XXXXXXX@OOOOOOO.com.tw") driver.find_element_by_id("pwd").send_keys("2222222222222") before_login_url=driver.current_url driver.find_element_by_id("submit").click() after_login_url=driver.current_url if before_login_url == after_login_url: print("unchanged") else: print("changed") time.sleep(10) right_click=driver.find_element_by_id("punchCardBtn") ActionChains(driver).context_click(right_click).perform() driver.quit() ---------------------------------------------- 以下是編譯過程中產生的錯誤訊息。 https://imgur.com/a/3N2p7XF 以上煩請指導,感謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 113.196.183.168 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1526375678.A.A0C.html

05/15 21:31, 6年前 , 1F
感覺像是某個傳值過程 跟網頁的是不一樣
05/15 21:31, 1F
※ 編輯: yimean (113.196.183.168), 05/16/2018 09:52:54 ※ 編輯: yimean (113.196.183.168), 05/16/2018 09:53:51

05/16 10:11, 6年前 , 2F
後來我使用Pyinstaller就成功了。看來跟工具是有很大關係
05/16 10:11, 2F
文章代碼(AID): #1Q-gJ-eC (Python)