[Newbies] OI screenshot Telegram install

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri May 28 21:09:12 UTC 2021


Hi David,


if the bot hangs again, you could press Cmd + Dot to interrupt it and find out where exactly it is hanging. Again, you could share a full stack trace then. :-)


What tests are failing? What failure/error messages do you get?


> TelegramBotError 409: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running.

> How do I reset the bot in a Squeak Workspace ?


<http://www.hpi.de/>
Technically, all TelegramBot frameworks for Smalltalk or Python or whatsoever are only clients. They use the Telegram Bot API which connects them to the actual server. This means that a part of the bot's state is kept on the Telegram servers. Concretely, this is an event queue. If you make requests for the same bot from multiple clients (i.e., images with TelegramSmalltalkBot), these conflict which each other because they both pull updates from the same queue.
Usually, you can simply ignore this error by pressing Proceed. If it occurs again, you should make sure that no other client is running at the same time. For TelegramBot in Squeak, you can do so by opening the process browser and searching for any telegram bot process. You can yellow-click them and choose terminate.


For testing, you can also manually inspect the latest updates for the bot by evaluating the following in your workspace:


bot peekUpdates explore.


If you have sent a message to the bot before, you should see a non-empty list.

> I think perhaps I should try an older image 5.3 or early 6.0alpha, and not update it ? What do you think ?

No, TelegramBot/TelegramSmalltalkBot are explicitly designed to "live at head", older versions of Squeak Alpha are not supported. I can only tell that it works well for me with an up-to-date Trunk image for both Windows 2004 and Debian/Raspbian. If you can provide a concrete stack trace, we should be able to solve the problem. :-)

Best,
Christoph
________________________________
Von: stes at PANDORA.BE <stes at telenet.be>
Gesendet: Freitag, 28. Mai 2021 20:07:14
An: Thiede, Christoph
Cc: beginners
Betreff: Re: [Newbies] OI screenshot Telegram install

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


Hi,

I could not reproduce the debugger timeout:

ConnectionTimedOut: Data receive timed out.

In my new tests on OpenIndiana and SUSE SLES 15 , I get the same behaviour :

        bot := TelegramSmalltalkBot withToken: '<your_bot_token>'.
        bot spawnNewProcess.

hangs.  Of course the hang MAY end in a timeout, I only waited 5 minutes.

Also on SUSE, same thing.  It also hangs.

I think the token is correct because the creation of the Squeak bot,
works, and when I inspect it, it has retrieved the correct bot name.

Also on the same systems I am able to use Python telegram-send,
and with the Python program it works (can send messages to telegram);
so the network setup works.

Perhaps Squeak is more sensitive to network setup than Python,
it has some characteristics of a network problem (comm.timeout).

Also the Python test shows that the token is correct,
and that it network-wise could work, but perhaps it is a network issue.

DNS api.telegram.org and ping ICMP to that host work.

The DNS has records for both ipv4 and ipv6;
host api.telegram.org
api.telegram.org has address 149.154.167.220
api.telegram.org has IPv6 address 2001:67c:4e8:f004::9


Another remark:  I ran the tests in the Squeak TestRunner for TelegramSTBot,
and on OpenIndiana they all succeed, on Linux 2 failed but the others were OK.

When I experiment in the Workspace with DoIt of

        bot := TelegramSmalltalkBot withToken: '<your_bot_token>'.
        bot spawnNewProcess.

I get:

TelegramBotError 409: Conflict: terminated by other getUpdates request;
make sure that only one bot instance is running.


How do I reset the bot in a Squeak Workspace ?

Note that I am using very recent images 6.0alpa-20535.image 64 bit,
in both cases, on SUSE SLES Linux and on OpenIndiana.

I think perhaps I should try an older image 5.3 or early 6.0alpha,
and not update it ? What do you think ?

In any case your demonstration of the SqueakSmalltalkBot was impressive,
I'd like to run it  as well on either OpenIndiana or SUSE.

David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJgsTDGAAoJENdFDkXGicizA/EH/io/I79Y/bzYMQCpBlfRypjw
fyTdNmH0ts35DCITx5oNnfNj+3XPXtGJaryjrXPXkf42UfScEx/gLnLZw2a0kW5J
Ke5/4lbTIeXKOPtX8yZIIj7pHcC5LE//w+pWnHIFrZDjeJKgWTcKdIoq4ZE5hAjO
+BLVNrLbXYomsp+JbXfHwDuUDu38sSaN+Dj6nmi5pJN0slV3o4IQUohsluEhv3XO
jkjwU343WMDGyz2bFLmV+c4D6eQ3v1iDlEbl0wKiLZC6d10qHXktLvP5AuMnckz2
04jn/D3tcru2nCLCe1wAedhdD34vKykt4+YkPI6XDYytU9MFYW45UUfqpknJUDk=
=B3QY
-----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20210528/cce35153/attachment-0001.html>


More information about the Beginners mailing list