pusher_python_sdk's People
Forkers
zkdfbb townke monomaniar sunguo andych008 jayjicheng wowgeeker jiangzhonghui sirithink flappymonkey goreycn beiliubei xuxaiobovip kelvinlee0317 quatanium jumping huazi198701 jonexiong hphp seamancode wanghaolw mygu xuziyan001 easonyi rongjiechen williamren bb33bb leeomar ithacadreampusher_python_sdk's Issues
关于中文推送
楼主的版本支持中文推送吗???本人想测试一下 但是运行起来总是报错。有劳楼主解答一下~~
queryBindList的参数问题
文档中的userId参数是可选的,sdk中的函数声明为了必选,请更正
def queryBindList(self, userId, optional = None):
消息内容包含引号导致400错误
烦请博主解答下:
使用Java来实现百度云推送的时候,存在如下现象
如下内容发透传消息失败:
{"id":9,"type":9,"title":"A","content":"花花太花花开始关注你的了。"}
如果把消息内容稍加修改(去掉最后的})就可以发送成功:
{"id":9,"type":9,"title":"A","content":"花花太花花开始关注你的了。"
由于不太懂python,装pycurl失败了,所以没法验证下博主的python版本是否也存在类似问题呢?
Some tiny bugs
(1) Line 149 in Channel.py
ChannelExcepthion 应该是 ChannelException
(2) Channel类变量 _arrayErrorMap 没有囊括(百度文档 http://developer.baidu.com/wiki/index.php?title=docs/cplat/push/api#JSON.E5.93.8D.E5.BA.94.E7.BC.96.E7.A0.81)
中所列出的所有错误代码,所以会导致如下错误:
File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 761, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/linuxdev3/homer/server/push/__init__.py", line 193, in _push_and
ret = c.pushMessage(push_type, message, message_key, optional)
File "/home/linuxdev3/homer/server/push/lib/Channel.py", line 226, in pushMessage
self._channelExceptionHandler(e)
File "/home/linuxdev3/homer/server/push/lib/Channel.py", line 547, in _channelExceptionHandler
print ex.error_msg, self._arrayErrorMap[ex.error_code]
KeyError: 30608
channel_id 类型异常
Traceback (most recent call last):
File "sample.py", line 103, in
test_queryBindList()
File "sample.py", line 53, in test_queryBindList
ret = c.queryBindList(user_id, optional)
File "../Channel.py", line 181, in queryBindList
return self._commonProcess(arrArgs)
File "../Channel.py", line 493, in _commonProcess
ret = self._baseControl(paramOpt)
File "../Channel.py", line 465, in _baseControl
url += resource
TypeError: cannot concatenate 'str' and 'int' objects
Channel.py
464 url = 'http://' + host + '/rest/2.0/' + Channel.PRODUCT + '/'
465 url += resource
改为
464 url = 'http://{}/rest/2.0/{}/{}'.format(host,Channel.PRODUCT,resource)
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.