Using your Puppet PadLocal token with Python, Java, and Go Wechaty #1985
Replies: 34 comments 13 replies
-
This is awsome! The Gate Server's log like this:
I don't know if I succeeded, But the log info looped. But when I run ding-dong-bot.py, an error occurred:
It seems like network problem, but I'm not sure, because I have deployed a Flask server before in this PC. So is there any suggest about this error?
|
Beta Was this translation helpful? Give feedback.
-
@IvanEvan Thanks for the reporting! Please understand that we are in the alpha stage of both the Python Wechaty project and the Token Gate Server, and we might have not enough resources to support them in a short period of time. I'd like to suggest that we'd better try reading the source code from the error message and learn what has happened, it might be the best way to solve the problem for our developers! At last, the only advice that I can give on your issue is to check whether your IP & Port are public visitable on the internet. (they are showed in the https://api.chatie.io/v0/hosties/your_padplus_token) because the last line of your error message is: TimeoutError: [Errno 10060] Connect call failed |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
我在开发服务器部署的,是不是开发服务器一直连不上后端的服务器?
总有这样的消息输出 |
Beta Was this translation helpful? Give feedback.
-
客户端发送
|
Beta Was this translation helpful? Give feedback.
-
I can't get it. How to do this on WIN10? |
Beta Was this translation helpful? Give feedback.
-
I wonder here what's the IP & Port as shown in https://api.chatie.io/v0/hosties/your_padplus_token like ('219.133.170.253', 8788) refer to? is it the host that has run docker run zixia/wechaty? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
go-wechaty-getting-started 发送#ding Assertion failed
|
Beta Was this translation helpful? Give feedback.
-
@echoboss you can try
|
Beta Was this translation helpful? Give feedback.
-
解决了么 |
Beta Was this translation helpful? Give feedback.
-
不太行
|
Beta Was this translation helpful? Give feedback.
-
We have a bug with padplus which caused the Should be fixed as the following: - timestamp : rawPayload.createTime / 1000, // Padplus message timestamp is seconds
+ timestamp : Math.floow(rawPayload.createTime / 1000), // Padplus message timestamp is seconds The buggy code set the timestamp to float number like To be fixed. |
Beta Was this translation helpful? Give feedback.
-
The Error [AssertionError]: Assertion failed bug with padplus should be fixed with Wechaty v0.41.26 or later versions. |
Beta Was this translation helpful? Give feedback.
-
There's another bug related to padplus: the To be fixed. |
Beta Was this translation helpful? Give feedback.
-
@smwsk If you are using the Hostie Puppet, then you will be able to use the donut/wxwork token directly with Wechaty. The token gateway is only needed by non-hostie tokens. |
Beta Was this translation helpful? Give feedback.
-
I have a padplus token. How can I just convert the token to be valid without touching my bot code? My bot code is Javascript. |
Beta Was this translation helpful? Give feedback.
-
The PadPlus Puppet Service has been deprecated. Please refer to https://github.com/wechaty/puppet-services/issues/11 You can send an application to replace your padplus token to other types like Donut/WXWork/Rock/PadLocal, learn more about the Puppet Service from https://wechaty.js.org/docs/puppet-services/ |
Beta Was this translation helpful? Give feedback.
-
I have a padlocal token. And I have successfully run a Wechaty Token Gate Server with this token. I have verified the gate server with url: https://api.chatie.io/v0/hosties/my_token. I am using python-wechaty-hostile, from the python side, I saw logs:
From the gateway server side:
Here is the docker command I used to run the wechaty gateway server:
What is wrong with my setup? Am I missing some component? |
Beta Was this translation helpful? Give feedback.
-
Hi @inkpool , it's great to hear from you that you are using Wechaty Token Gateway with PadLocal Puppet! After review your problem, I found you need to change the gateway start docker command in the following two points because you are using
docker run -ti -e WECHATY_LOG="verbose" \
- -e WECHATY_PUPPET="wechaty-puppet-hostie" \
+ -e WECHATY_PUPPET="wechaty-puppet-padlocal" \
- -e WECHATY_PUPPET_HOSTIE_TOKEN="puppet_padlocal_xxxxxxxxxx" \
+ -e WECHATY_PUPPET_PADLOCAL_TOKEN="puppet_padlocal_xxxxxxxxxx" \
-e WECHATY_HOSTIE_PORT="9001" \
-e WECHATY_TOKEN=“mytokenxxxxxxx" \
-p "$WECHATY_HOSTIE_PORT:9001” \
wechaty/wechaty Please let me know if the above changes fixed your problem. |
Beta Was this translation helpful? Give feedback.
-
Using this CMD to run the wechaty/wechaty:next docker: docker run -ti -e WECHATY_LOG="verbose" -e WECHATY_PUPPET="wechaty-puppet-padlocal" -e WECHATY_PUPPET_PADLOCAL_TOKEN="puppet_padlocal_xxxxxx" -e WECHATY_HOSTIE_PORT="9001" -e WECHATY_TOKEN="mytokenxxxxx" -p "$WECHATY_HOSTIE_PORT:9001" wechaty/wechaty:next I got the following error:
I can still see the gateway is online on https://api.chatie.io/v0/hosties/mytokenxxxxx with my public IP and port. (DDNS works) PS. This error does not pop up if I create the gateway server with an HK vps. But for my VPS in the mainland, it shows this error. |
Beta Was this translation helpful? Give feedback.
-
I believe that if you can run the gateway with your VPS in HK, then the gateway is working without any problem. Your issue seems related the PadLocal , can you try to use another puppet, like puppeteer or wechat4u? |
Beta Was this translation helpful? Give feedback.
-
i use wechaty-puppet-padlocal-demo run demo is ok,but use docker for padlocal is error
https://api.chatie.io/v0/hosties/mytokenxxxxx can't find ip and port
|
Beta Was this translation helpful? Give feedback.
-
I have a padlocal token. And I have successfully run a Wechaty Token Gate Server with this token.
then I set env
then run
I also set this
then
What is wrong with my setup? Am I missing some component?
|
Beta Was this translation helpful? Give feedback.
-
Link to wechaty/puppet-supports#84 |
Beta Was this translation helpful? Give feedback.
-
请问一下, 我启动服务之后一直出现 |
Beta Was this translation helpful? Give feedback.
-
请教大佬,使用的padlocal已正常运行起来,能看到聊天记录, 问题日志: 感谢! |
Beta Was this translation helpful? Give feedback.
-
运行这个 13:31:06 ERR Config ###########################
(node:40609) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2) |
Beta Was this translation helpful? Give feedback.
-
2023-07-20 15:56:55,135 - Wechaty - INFO - init_puppet_event_bridge() <<wechaty_puppet_service.puppet.PuppetService object at 0x000002203F5D6A60>> |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
TL;DR: go to https://wechaty.js.org/docs/puppet-services/diy/
Update Mar 19, 2021
We have published this issue as a Wechaty Puppet Service DIY docs at https://wechaty.js.org/docs/puppet-services/diy/
Please read the latest version from our website link above.
If you find any issues, please feel free to create a PR to fix them, thank you very much!
Huan
⬆️ Please read the above update notice.
⬇️ The following information is outdated.
Since we have our branding new Multi-lang Wechaty ready to use from this week, it would be great for our Python, Java, and Go developers to have a try with them!
However, all of the above gettings started repos need a TOKEN for wechaty-puppet-service.
A token for wechaty-puppet-padlocal will not work for our MultiLang Wechaty unless you do a converting as described below:
1 Pull the latest Wechaty Docker Image
2 Set your padlocal token
3 Start your Wechaty Token Gate Server:
Notice:
WECHATY_PUPPET_SERVER_PORT
must be accessible on the internet.4 That's it, you are set!
Your PadLocal token is ready to use by Python, Java, and Go Wechaty!
Link to: #1927
All in One Command
For use Wechaty Token Gateway with ease, you can copy/paste the following code in your bash shell:
Then you will be able to start your Wechaty Token Gateway with just one line of command:
I hope you enjoy it!
Update Aug 13, 2020: docker image name changed
Please notice that our docker image has been renamed to wechaty/wechaty.
The
will not be updated anymore, so please remember to rewrite your scripts to use the wechaty/wechaty image.zixia/wechaty
zixia/wechaty
wechaty/wechaty
Thank @YangTe1 for noticing me about this issue, please feel free to let me know if you know there are any other doc posts that need to update.
Beta Was this translation helpful? Give feedback.
All reactions