New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using pyinstaller when importing pygsheets #490
Comments
I am receiving the same error converting my script to an EXE via pyinstaller. This is only when I run the .exe file. The python file runs with no issues.
|
I made a breakthrough with some testing. When I used pyinstaller without the I hope this helps as a work-a-round. |
The issue here is with this code
into this:
Similarly in drive.py:
I got the URLs from the website https://developers.google.com/discovery/v1/reference/apis/list searching in the API Explorer.
|
I tried @mjstamper tip and it worked! but it's not a good enough solution for me because I need to be able to make my app into one file and to send to the analysts that will be working on it, and not a whole folder. |
@satya0826 Thanks, I will apply the fix. |
@satya0826 was this issue solved by adding service URL? did you test it? because according to the source of build method. the discoveryServiceUrl has a default value which points to the google api. |
@danagold404 hardcoded the URI, please verify if this fixes the issue. |
please provide full description, which file or folder you copy and where you paste in which folder you paste it. |
@mjstamper please provide full description of it |
@Awais-Bin-Riaz I am not sure what more you need. The folder is the local install of pygheets and placed in the dist folder, created by pyinstaller. I hope this helps. |
A fix for this is deployed in staging. Please install from there. ref #493
|
@mjstamper answer saved me. Copy and paste the libraries worked. Just a little thing was different: i didnt find the library in |
I had the same issue as well, and I tried to fix by copy and paste the libraries and modifying sheet.py and drive.py like @satya0826 did. Does anyone has a suggestion? |
I did the same and still got the issue. Fixed it by using --collect-data pygsheets flag to pyinstaller cmd |
Hi everyone!
I'm trying to create an exe file to distribute among users in my company.
the exe file open a simple GUI (made with Tkinter), which allows the user to select a txt file from their pc and inserts the data from the txt into a Google sheet.
I tested my python script before attempting to turn it into an exe and it worked great.
but now, when I'm trying to use Pyinstaller it shows the following error:
this is the cmd command I used to create the exe file:
C:\Users\Asus\PycharmProjects\dmtrial\venv>pyinstaller --onefile DMPulse2GS.py
it created three folders in this directory called: 'dist', 'build', and 'pycache'
after it finished running successfully, I copied my Service Accounts Key (json file) to the 'dist' folder created by Pyinstaller. (I also tried adding the file using --add-data when running pyinstaller for the first time on the file but it returns the same error)
then I tried clicking the exe file, which was when it returned the above error.
I tried everything!! any help / tips would be amazing! Thanks in advance!
The text was updated successfully, but these errors were encountered: