0

I write a python script to process some data in excel file and I use tkinter to generate a UI to input some paramaters, including input file path and output file path.

I use pyinstaller to package the script into exe. When I run the exe and input the paramaters in the UI, the following error appears:

Exception in Tkinter callback
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1892, in __call__
  File "ut_calculate_tool.py", line 130, in calculate_data
  File "styleframe\style_frame.py", line 318, in ExcelWriter
  File "pandas\io\excel\_openpyxl.py", line 52, in __init__
  File "pandas\io\excel\_base.py", line 925, in __init__
  File "pandas\io\common.py", line 711, in get_handle
PermissionError: [Errno 13] Permission denied: 'C:/Users/XinDong/Documents/UT Calculate'

The path 'C:/Users/XinDong/Documents/UT Calculate' is the output path I typed into the UI.

Does anyone know how to deal with the bug? Thanks in advance.

Rachel Dong
  • 179
  • 1
  • 3
  • 11

1 Answers1

0

Cause of the error is the logic of my code, not pyinstaller, I should pass a file name to the backend, not a folder...

Rachel Dong
  • 179
  • 1
  • 3
  • 11
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 02 '21 at 10:10