0
I am trying to make an executable of a script that I did where the program performs, in summary, the following tasks:
1 - Receives input from the operator 2 - Create some folders based on the inputated data 3 - Open Google Chrome and access a website and download some files 4 - Open one of these downloaded files and make changes 5 - Move these files from the Downloads folder to the created folders
So far, ok. The script works. However, when I make the script as an executable it only works until the folder creation part. My setup to build the executable is as follows:
from cx_Freeze import setup, Executable
import sys
import os
os.environ['TCL_LIBRARY'] = 'C:\\Users\\peo_cpena\\AppData\\Local\\Programs\\Python\\Python38\\tcl\\tcl8.6'
os.environ['TK_LIBRARY'] = 'C:\\Users\\peo_cpena\\AppData\\Local\\Programs\\Python\\Python38\\tcl\\tk8.6'
base = None
if sys.platform == 'win32':
base = 'console'
executables = [Executable('MoneyOut_ComExcel_teste.py', base=base)]
packages = [
'os',
'datetime',
'calendar',
'time',
'selenium',
'shutil',
'pandas',
'idna'
]
options = {
'build_exe':{
'excludes': ['mpl_toolkits'],
'packages': packages,
'include_files':[
os.path.join('C:\\Users\\peo_cpena\\AppData\\Local\\Programs\\Python\\Python38\\DLLs\\tcl86t.dll'),
os.path.join('C:\\Users\\peo_cpena\\AppData\\Local\\Programs\\Python\\Python38\\DLLs\\tk86t.dll')
]
},
}
setup(name='MoneyOutExec',
options=options,
version='1.0',
description='Executavel do fechamento mensal',
executables=executables
)
And the imports I made in the original script were:
from os import mkdir
from datetime import date
from calendar import month_name
import time
from selenium import webdriver
from shutil import move
import pandas as pd
When I inputo the information in the executable console appears a sequence of messages very fast and then the console closes and I can not read what is written. Can anyone tell me how I could fix this problem?