Windows: 'signal' has no attribute 'SIGQUIT'
Hi There,
Please let me know if I'm doing something wrong. I'm trying to use this module on Windows 10 64-bit. I have successfully built the tdlib DLLs.
I want to use the module as a client login on my Telegram account, to read the messages which I receive.
When trying to run the basic demonstrator script:
from telegram.client import Telegram
tg = Telegram(
api_id='123456',
api_hash=xxxxxxxxxxxxxxxxxxx',
phone='+12345678',
database_encryption_key='xxxxxxxxxxxx',
)
tg.login()
def new_message_handler(update):
print('New message!')
tg.add_message_handler(new_message_handler)
tg.idle()
I get error:
Traceback (most recent call last):
File "tdlib-test.py", line 1, in <module>
from telegram.client import Telegram
File "C:\Users\simonh\AppData\Local\Programs\Python\Python38\lib\site-packages\telegram\client.py", line 42, in <module>
class Telegram:
File "C:\Users\simonh\AppData\Local\Programs\Python\Python38\lib\site-packages\telegram\client.py", line 480, in Telegram
self, stop_signals: Tuple = (signal.SIGINT, signal.SIGTERM, signal.SIGABRT, signal.SIGQUIT)
AttributeError: module 'signal' has no attribute 'SIGQUIT'
It looks like a problem with support for Windows, if Windows does not support the SIGQUIT function.
Is this an issue for all Windows, or something strange with my platform?
Thank you Simon
Hi. Yes, this is an issue for any Windows, the library doesn't support it at the moment. Sorry, I'll update the documentation and the README file
Thank you, you do mention in the top of your readme, but I didn't see the note until now:
"This library requires Python 3.6+ and Linux or MacOS."
Maybe just add "WINDOWS IS NOT SUPPORTED AT THIS TIME".
Thanks anyway :-)