Comments (5)
Resolved. Thanks for being my Rubber Duckie. Changing my code to not persist immediately resolves it. Sorry for missing this important information.
The Fix:
od_excel_file = WorkBook(XLfile, use_session=False, persist=False)
from python-o365.
Reopening issue. It works randomly, but a majority of the time it still gives the 404 error with the use_session and persist false values.
How to test. Make one python or two python scripts that attach to an excel on onedrive and sharepoint doc libraries. Call one, then the other. The error will appear.
from python-o365.
Can I see the error messages? I don't know what's happening and I don't know If I will be able to fix it
from python-o365.
Hello everyone, I have the same problem. I am trying to modify an Excel file on SharePoint, and I can access it using ysguy's workaround (od_excel_file = WorkBook(XLfile, use_session=False, persist=False). However, when I try to access the sheets, columns, or individual rows, it gives me this error again:
requests.exceptions.HTTPError: 404 Client Error: Not Found for the URL:
https://graph.microsoft.com/v1.0/me/drive/items/01GOIU2PSQMCWJ47LBVRA33LRPXUHQCGDK/workbook/worksheets/MIGRATION
Error Message: The resource could not be found.
if I check the link provided above I retrieve a weird token error:
{
error: {
code: "InvalidAuthenticationToken",
message: "Access token is empty.",
innerError: {
date: "2024-02-05T10:52:47",
request-id: "c989ec4f-1cf9-4c8b-9de0-92692a141602",
client-request-id: "c989ec4f-1cf9-4c8b-9de0-92692a141602"
}
}
}
ps: I have used the following method to authenticate my application. And it return the default_storage correctly.
def access_sharepoint_drive() -> Drive:
"""
Access sharepoint drive
:return: sharepoint drive
"""
credentials = (os.environ.get("CLIENT_ID_SHAREPOINT"), os.environ.get("CLIENT_SECRET_SHAREPOINT"))
account = Account(credentials)
# used only for the first time
# scopes = ['basic', 'Files.ReadWrite.All', 'Files.Read.All']
# if account.authenticate(scopes=scopes):
# logging.info("Authenticated to sharepoint")
storage = account.storage()
return storage.get_default_drive()
from python-o365.
Hi I don't have the time to investigate this atm.
If you want to, a good start are ms graph docs:
https://learn.microsoft.com/en-us/graph/api/resources/excel?view=graph-rest-1.0
from python-o365.
Related Issues (20)
- Cookie based auth HOT 1
- What does the msgraph-sdk-python mean for the future of this project? HOT 3
- I can't use refresh token in airflow environment HOT 3
- ZoneInfo object has no attribute Zone exception HOT 3
- Reach to the file name by the path HOT 1
- 'zoneinfo.ZoneInfo' object has no attribute 'zone' HOT 1
- "Protocol not provided to Api Component" when copying files from a shared OneDrive HOT 3
- requirements.txt not consisting with setup.py dependency versions HOT 1
- TimeZone Handling HOT 8
- No email rule creation
- 2.0.33 : 'MSGraphProtocol' object has no attribute 'keyword_data_store' HOT 16
- O365.utils.utils.Query.any does not support negate() and does not follow the group? HOT 4
- No auth token found. Authentication Flow needed HOT 1
- Inconsistent behavior of `attachment.attachment_type` in legacy vs new Outlook HOT 4
- a small issue in "python-o365-master\O365\connection.py" HOT 1
- How to ignore email signature files HOT 2
- 'bucket_id' is missing in accepted update parameters HOT 1
- Logic error regarding the use of duple types (Query and str)
- How to determine mailbox access? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-o365.