Skip to content

[Bug]: wechaty_puppet.exceptions.WechatyPuppetConfigurationError: WechatyPuppetConfigurationError("can't not ping endpoint: 127.0.0.1:8080", None, None) #434

Open
@beichen2023

Description

@beichen2023

Environment

raise WechatyPuppetConfigurationError(
wechaty_puppet.exceptions.WechatyPuppetConfigurationError: WechatyPuppetConfigurationError("can't not ping endpoint: 127.0.0.1:8080", None, None)

Description

本地已经用node运行了服务
能够接受到微信信息了
难道说一定要docker不允许用window运行node服务?

Minimum reproducible code

import os
os.environ['token'] = 'xxxxxxxxxxxxxx'

os.environ['WECHATY_PUPPET_SERVICE_ENDPOINT'] = '127.0.0.1:8080'

os.environ['WECHATY_PUPPET_SERVICE_ENDPOINT'] = 'xxxxxxxxxxxxx:21214'

import asyncio
from typing import List, Optional, Union

from wechaty_puppet import FileBox # type: ignore

from wechaty import Wechaty, Contact
from wechaty.user import Message, Room

class MyBot(Wechaty):

async def on_message(self, msg: Message):
    """
    listen for message event
    """
    from_contact: Optional[Contact] = msg.talker()
    text = msg.text()
    room: Optional[Room] = msg.room()
    if text == 'ding':
        conversation: Union[Room, Contact] = from_contact if room is None else room
        await conversation.ready()
        await conversation.say('dong')
        file_box = FileBox.from_url(
            'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/'
            'u=1116676390,2305043183&fm=26&gp=0.jpg',
            name='ding-dong.jpg')
        await conversation.say(file_box)

asyncio.run(MyBot().start())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions