这是我的代码的一部分,db.users_vi()是一个列表文件。当程序到达def viber_not时,它开始工作得非常慢,它每30秒发送一条消息,甚至更慢。我怎样才能让它工作得更快,为什么它这么慢? def viber_not():
users = db.users_vi()
text = random.choice(texts)
for k in users:
try:
viber.send_messages(k[1], [TextMessage(text=text)])
except:
pa
机器人问题。当发送数据时,机器人会给出一个与数据库中没有用户匹配相关的错误。实际上,在这种情况下,用户不会被添加到proceed_request()函数中的库中。可能的问题是什么?谢谢。
def proceed_request(self, viber_request):
if isinstance(viber_request, ViberMessageRequest):
if not User.objects.filter(user_id=viber_request.sender.id).exists():
Use
我在/opt/viber的Ubuntu19.04上安装了Viber。我一开始就什么都没发生。我在/opt/viber/Viber开了一个终端:
root@asshat:/opt/viber# ./Viber
[16075:16075:0430/092527.937550:ERROR:zygote_host_impl_linux.cc(90)]
Running as root without --no-sandbox is not supported.
See https://crbug.com/638180.
然后我尝试/opt/viber/Viber --no-sandbox,但是我继续得到
我正在用Python (Aiogram)制作一个带有PostgreSQL数据库的电报机器人。数据库运行在Ubuntu20.04服务器上,机器人运行在同一台服务器上。当我启动机器人时,它给出了一个错误:
asyncpg.exceptions.InvalidAuthorizationSpecificationError: no pg_hba.conf entry for host "*server IP*", user "my_user", database "my_db", SSL off
配置为listen_addresses = '*&
是一种新的统计编程语言,它声称比竞争语言的性能要好得多。我在试着证实这一点。Julia有一个用Python语言编写的性能测试:
我不能让它和pypy一起工作。也许这是由于numpypy与numpy的不兼容,但我还不能确定这一点。我遵循了ImportError的建议"...or just write 'import numpypy' first in your program...",但我得到了另一个ImportError:"No module named numpy.linalg"
我几乎没有使用Python的经验,我正在寻找一个我可以运行的完整
正在尝试设置viber网络挂钩。我已经有了一个快速服务器设置。因此,我只是将机器人添加为中间件。一切都已找到,服务器已启动并运行。 一旦调用了bot.setWebhook(process.env.VB_WEBHOOK_URL),它就会抛出错误--> The "data" argument must be one of type string, TypedArray, or DataView. Received type object 当尝试在本地服务器配置中使用ngrok时,它工作得很好。在实时服务器配置中设置webhook时的唯一问题。请检查下面的代码
最近升级为Ubuntu 22.04。Ubuntu的桌面Viber应用程序坏了。我想现在就把它移走。但是,当试图使用apt删除它时,获取:
sudo apt remove viber
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
viber
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
A
我正在使用Gallium,这是一个地区,是建立在ubuntu上,特别是Chromebook。这个地区真的很棒,而且非常轻,但是我有一个重要的问题,这对我来说很重要。
每当我试图运行Viber时,我都会得到这个错误。
chrx@chrx:~$ /opt/viber/Viber
This application failed to start because it could not find or load the Qt platform plugin "xcb".
Available platform plugins are: eglfs, linuxfb, minimal,