Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

convert to exe file but can't access SharePoint

Open JoyceSmile2019 opened this issue 6 years ago • 3 comments

Hi everyone, I am a beginner for Python. I wrote script for downloading file from SharePoint. It works when I execute through Python Shell. However, when I converted it to an exe file via PyInstaller, it catches the username and password error. The message told me that it couldn't find 'office365\runtime\auth\SAML.xml'. Does it mean PyInstaller can'r recognize the office365 package? I have tried everything I can but still not work. Anyone can help?

Thank you very much.

JoyceSmile2019 avatar Dec 16 '19 05:12 JoyceSmile2019

Hi, I found a solution, in the root directory you need to create a tree the script folder in office365\runtime\auth and attach the file with the necessary parameters for the connection (url, loggin, password) there.

aazavid avatar Mar 17 '20 14:03 aazavid

Hi there, I'm having the same problem as @JoyceSmile2019 but am finding it hard to follow your advice @aazavid.... entirely my fault! Would you mind elaborating on your answer a bit for a beginner?! I'm using office365 Version: 0.3.15 and cannot find the address office365\runtime\auth.... Also, could you explain " in the root directory you need to create a tree the script folder...", please? Any help is much appreciated! Thanks in advance.

TonyGilfellon avatar May 19 '21 13:05 TonyGilfellon

Hi, I had a similar issue, where pyinstaller was failing to import the module entirely.

I fixed my problem by adding the following to my .spec file:

('venv/Lib/site-packages/office365','office365')

SergCR avatar Jun 21 '21 02:06 SergCR