Comments (6)
Thanks! The fix worked for me!
from groupy.
Well I'm mobile at the moment, but it looks like I was expecting the
exception argument to be a dictionary of JSON returned from the API in the
case of a bad request. However, it appears there is no JSON being returned
at all, which leads to the first exception, and ultimately leads to the
last exception (which occurs during the handling of the first exception).
I'll try to release a fix for this over the weekend as I'm rather bogged
down with work this week. Thanks for bringing this to my attention and I'll
keep you abreast of the situation.
On Wed, Apr 13, 2016, 5:53 PM Dave Morris [email protected] wrote:
I tried to follow the tutorial that uses messages.iolder() within a while
loop, and I get the following error. Any idea what I might be doing wrong?while messages.iolder():
... pass
...
Traceback (most recent call last):
File "/Users/dvmorris/Documents/Groupy/groupy/api/endpoint.py", line 69, in response
data = r.json()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/init.py", line 319, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/dvmorris/Documents/Groupy/groupy/object/responses.py", line 126, in messages
since_id=since, after_id=after)
File "/Users/dvmorris/Documents/Groupy/groupy/api/endpoint.py", line 303, in index
return cls.response(r)
File "/Users/dvmorris/Documents/Groupy/groupy/api/endpoint.py", line 71, in response
raise errors.ApiError(r)
groupy.api.errors.ApiError: <Response [304]>During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/Users/dvmorris/Documents/Groupy/groupy/object/listers.py", line 168, in iolder
old = self.older()
File "/Users/dvmorris/Documents/Groupy/groupy/object/listers.py", line 145, in older
return self.group.messages(before=self.oldest.id)
File "/Users/dvmorris/Documents/Groupy/groupy/object/responses.py", line 129, in messages
if e.args[0]['code'] == status.NOT_MODIFIED:
TypeError: 'Response' object is not subscriptable—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#23
from groupy.
No problem at all. Thanks for getting back to me so quickly! Let me know if I can help in any way.
from groupy.
Were you able to look into this issue?
from groupy.
I'm working to fix it this morning. Hopefully it goes smoothly :)
from groupy.
@dvmorris @mmirate This fix should be available on the PyPI shortly as version 0.6.6! Thanks for pointing out this issue :)
I'm currently experiencing a 500 error trying to upload it. I expect they're having some issues at the moment, but I'll keep trying throughout the day.
from groupy.
Related Issues (20)
- ApiError crashing the bot HOT 12
- attachments module: import errors, not serializable HOT 3
- Mentions not serializing on Post method HOT 6
- Mentions not serializing when posting from a Bot HOT 1
- API Key should not rely on global module-level variable HOT 17
- Recieve is spelled Receive
- Can't install even when Pillow is installed HOT 5
- authorization error.. anyone else? HOT 2
- Can't send messages to a chat? HOT 9
- potential parsing error on large groups HOT 2
- Like comments in a group without conversation_id? HOT 2
- Get 'likes' stats on a particular message HOT 2
- Gallery call crashes when shared Documents are in Gallery HOT 8
- API Token Validation HOT 2
- Issue with groups containing emoji in group name HOT 2
- Can't create multiple bots with no callback url HOT 6
- Adding to a group with user-id
- Adding by user id issue HOT 1
- Issue retreiving current location attachment
- How to Reply to Messages
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 groupy.