I do receive the code after a longer wait, but when I click activate I get server error with the below output on the console.
DEBUG:telethon.network.mtproto_sender:Read RPC error: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
DEBUG:telethon.telegram_bare_client:DC error when invoking request, attempting to reconnect at DC 1
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 951, in _recv_thread_impl
self._sender.receive(update_state=self.updates)
AttributeError: 'NoneType' object has no attribute 'receive'
DEBUG:telethon.network.mtproto_sender:Handling bad server salt
DEBUG:telethon.network.mtproto_sender:Processing TLObject new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Read RPC error: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
DEBUG:telethon.telegram_bare_client:DC error when invoking request, attempting to reconnect at DC 1
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 951, in _recv_thread_impl
self._sender.receive(update_state=self.updates)
AttributeError: 'NoneType' object has no attribute 'receive'
DEBUG:telethon.network.mtproto_sender:Handling bad server salt
DEBUG:telethon.network.mtproto_sender:Processing TLObject new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Read RPC error: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 4.')
DEBUG:telethon.telegram_bare_client:DC error when invoking request, attempting to reconnect at DC 4
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 951, in _recv_thread_impl
self._sender.receive(update_state=self.updates)
AttributeError: 'NoneType' object has no attribute 'receive'
DEBUG:telethon.network.mtproto_sender:Handling bad server salt
DEBUG:telethon.network.mtproto_sender:Processing TLObject new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Read RPC error: (FloodWaitError(...), 'A wait of 82771 seconds is required.')
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_303.PhoneMigrateError: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/utils.py", line 15, in make_request
clients_list[phone].send_code_request(phone)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 281, in send_code_request
SendCodeRequest(phone, self.api_id, self.api_hash))
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 247, in invoke
return self.invoke(request)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_420.FloodWaitError: (FloodWaitError(...), 'A wait of 82771 seconds is required.')
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 947, in _recv_thread_impl
int.from_bytes(os.urandom(8), 'big', signed=True)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/mtproto_sender.py", line 63, in send
self._send_packet(writer.get_bytes(), request)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/mtproto_sender.py", line 129, in _send_packet
self.connection.send(cipher_writer.get_bytes())
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/connection.py", line 173, in _send_tcp_full
self.write(writer.get_bytes())
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/connection.py", line 215, in _write_plain
self.conn.write(data)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/extensions/tcp_client.py", line 66, in write
self._socket.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
DEBUG:telethon.network.mtproto_sender:Read RPC error: (FloodWaitError(...), 'A wait of 82746 seconds is required.')
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_303.PhoneMigrateError: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/utils.py", line 15, in make_request
clients_list[phone].send_code_request(phone)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 281, in send_code_request
SendCodeRequest(phone, self.api_id, self.api_hash))
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 247, in invoke
return self.invoke(request)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_420.FloodWaitError: (FloodWaitError(...), 'A wait of 82746 seconds is required.')