python-o365 icon indicating copy to clipboard operation
python-o365 copied to clipboard

Error Message: Invalid version

Open eclass4learning opened this issue 3 years ago • 0 comments

Greetings!

I am trying to retrieve email using the code attached, but I get the following stack error. If I take out the "None" part of the version (v1.0) the error goes away when trying on a browser.

Any ideas?

===================================== [root@ip-10-2-0-162 auto-enrol]# ./get_csv.py Authenticated! Client Error: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0None?%24filter=displayName+eq+%27Inbox%27&%24top=1 | Error Message: Invalid version. Traceback (most recent call last): File "./get_csv.py", line 18, in inbox = mailbox.get_folder(folder_name='Inbox') # get a folder with 'archive' name File "/usr/local/lib/python3.7/site-packages/O365/mailbox.py", line 293, in get_folder response = self.con.get(url, params=params) File "/usr/local/lib/python3.7/site-packages/O365/connection.py", line 844, in get return self.oauth_request(url, 'get', params=params, **kwargs) File "/usr/local/lib/python3.7/site-packages/O365/connection.py", line 833, in oauth_request return self._internal_request(self.session, url, method, **kwargs) File "/usr/local/lib/python3.7/site-packages/O365/connection.py", line 795, in _internal_request raise HTTPError('{} | Error Message: {}'.format(e.args[0], error_message), response=response) from None requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0None?%24filter=displayName+eq+%27Inbox%27&%24top=1 | Error Message: Invalid version. [root@ip-10-2-0-162 auto-enrol]#

get_emails.txt

eclass4learning avatar Nov 22 '22 12:11 eclass4learning