Comments (6)
I have just committed a fix (31f931d). I'll publish a new version on pypi in the following hours.
It now works as expected.
Thanks
from pyo365.
Can you please paste the function call you use to get the messages?
Are you using the query helper?
from pyo365.
I get the same error using the query helper (same for attribute 'created_date_time'):
query = query.on_attribute('received_date_time').greater(datetime(2018, 10, 29))
Order: None
Select: None
Client Error: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?%24filter=receivedDateTime+gt+%272018-10-28T23%3A00%3A00%2B00%3A00%27&%24top=25
Traceback (most recent call last):
File "index.py", line 21, in <module>
messages = inbox.get_messages(limit=25, query=query)
File "/home/user/.virtualenv/research_rss/lib/python3.5/site-packages/pyo365/mailbox.py", line 138, in get_messages
response = self.con.get(url, params=params)
File "/home/user/.virtualenv/research_rss/lib/python3.5/site-packages/pyo365/connection.py", line 476, in get
return self.oauth_request(url, 'get', params=params, **kwargs)
File "/home/user/.virtualenv/research_rss/lib/python3.5/site-packages/pyo365/connection.py", line 472, in oauth_request
return self._internal_request(self.session, url, method, **kwargs)
File "/home/user/.virtualenv/research_rss/lib/python3.5/site-packages/pyo365/connection.py", line 453, in _internal_request
raise e
File "/home/user/.virtualenv/research_rss/lib/python3.5/site-packages/pyo365/connection.py", line 426, in _internal_request
response.raise_for_status() # raise 4XX and 5XX error codes.
File "/home/user/.virtualenv/research_rss/lib/python3.5/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages?%24filter=receivedDateTime+gt+%272018-10-28T23%3A00%3A00%2B00%3A00%27&%24top=25```
from pyo365.
yes:
query = mailbox.new_query()
query = query.on_attribute('ReceivedDateTime').greater_equal(datetime(2018, 10, 29, 8, 0))
messages = mailbox.get_messages(query=query)
from pyo365.
That was quick, thanks!
from pyo365.
pip install --upgrade pyo365
should now upgrade to 0.1.3 with some bugs fixed.
See ya
from pyo365.
Related Issues (18)
- Drive access does not work when accessing sharepoint drives. HOT 7
- body_type (html and text) HOT 9
- Question about get_authorization_url HOT 8
- Forwarded message fail to send HOT 2
- Change output of message.body from HTML to text HOT 1
- mark_as_unread HOT 5
- List names of message attachments HOT 5
- Global address book filter with multiple paramaters HOT 2
- Number of Attachments Count HOT 5
- Refresh Token HOT 10
- Unable to complete authentication HOT 15
- get_contacts() -> KeyError: 'id' HOT 1
- erroneous call to _to_api_data HOT 5
- Saving new contacts HOT 1
- setup.py HOT 1
- Error: Unable to fetch auth token. Error: (invalid_request) AADSTS90014: The request body must contain the following parameter: 'client_id'. HOT 2
- Publish PIP package? HOT 2
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 pyo365.