Python Forum
Pyinstaller exe file permissions - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Pyinstaller exe file permissions (/thread-19720.html)



Pyinstaller exe file permissions - Rainbow_Crash - Jul-11-2019

Hello,

First post so I hope it is ok.

I have written a Python program that connects to a REST API, reads a bunch of data and then saves it to a CSV file.

This works fine on my Windows 10 PC (I am a local admin user and the PC logs on to an AD domain).

I have used Pyinstaller to create a single Windows 10 exe file which also runs ok.

I have sent this exe file to a customer to collect some data from his server using the API but it fails at the stage that the script tries to create the CSV file for writing - the code for this is shown below.

############################# Create timestamp and open CSV file for writing ##########################################

csvfilename = host + '_resources_' + datetime.now().strftime("%Y-%m-%d_%H-%M-%S") + '.csv'
csvfile = open(csvfilename, 'w', newline='')
The customer claims he has admin rights on his PC and we have tried running the exe in various directories where the logged in user can save normal files from Word, Excel etc.

Is there some permissions that need to be allocated to the exe file? Google has failed me so I am hoping to get some pointers here from others who may have encountered similar issues.

Thanks for reading.


RE: Pyinstaller exe file permissions - SheeppOSU - Jul-11-2019

Can you provide an error. The best way to get the error from a .exe file is to open up the snipping tool and click create as soon as the error shows to freeze the screen and get a picture of the error before the .exe file closes